diff --git a/swaggerci/cognitiveservices.DefaultTag/readme.md b/swaggerci/cognitiveservices.DefaultTag/readme.md new file mode 100644 index 000000000000..8f6113ced295 --- /dev/null +++ b/swaggerci/cognitiveservices.DefaultTag/readme.md @@ -0,0 +1,10 @@ +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../../tools/SwaggerCI/readme.azure.noprofile.md + - $(this-folder)/../../../azure-rest-api-specs/specification/cognitiveservices/data-plane/ContentSafety/readme.md +try-require: + - $(this-folder)/../../../azure-rest-api-specs/specification/cognitiveservices/data-plane/ContentSafety/readme.powershell.md +``` diff --git a/swaggerci/healthdataaiservices.DefaultTag/readme.md b/swaggerci/healthdataaiservices.DefaultTag/readme.md new file mode 100644 index 000000000000..92d836e6ea4a --- /dev/null +++ b/swaggerci/healthdataaiservices.DefaultTag/readme.md @@ -0,0 +1,10 @@ +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../../tools/SwaggerCI/readme.azure.noprofile.md + - $(this-folder)/../../../azure-rest-api-specs/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.md +try-require: + - $(this-folder)/../../../azure-rest-api-specs/specification/healthdataaiservices/data-plane/HealthDataAIServices.DeidServices/readme.powershell.md +``` diff --git a/swaggerci/oracle.DefaultTag/.gitattributes b/swaggerci/oracle.DefaultTag/.gitattributes new file mode 100644 index 000000000000..2125666142eb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/.gitattributes @@ -0,0 +1 @@ +* text=auto \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/.gitignore b/swaggerci/oracle.DefaultTag/.gitignore new file mode 100644 index 000000000000..7998f37e1e47 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/.gitignore @@ -0,0 +1,5 @@ +bin +obj +.vs +tools +test/*-TestResults.xml \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.csproj b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.csproj new file mode 100644 index 000000000000..12e8840c37ca --- /dev/null +++ b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.csproj @@ -0,0 +1,44 @@ + + + + 0.1.0 + 7.1 + netstandard2.0 + Library + Az.OracleDatabaseResourceManager.private + false + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager + true + false + ./bin + $(OutputPath) + Az.OracleDatabaseResourceManager.nuspec + true + + + 1998, 1591 + true + + + + false + TRACE;DEBUG;NETSTANDARD + + + + true + true + MSSharedLibKey.snk + TRACE;RELEASE;NETSTANDARD;SIGN + + + + + + + + + $(DefaultItemExcludes);resources/** + + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.format.ps1xml b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.format.ps1xml new file mode 100644 index 000000000000..387a61bfc49c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.format.ps1xml @@ -0,0 +1,10543 @@ + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesFailoverAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesFailoverAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesRestoreAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesRestoreAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesShrinkAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesShrinkAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesSwitchoverAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesSwitchoverAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesUpdateAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AutonomousDatabasesUpdateAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudExadataInfrastructuresDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudExadataInfrastructuresDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudExadataInfrastructuresUpdateAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudExadataInfrastructuresUpdateAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersAddVmsAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersAddVmsAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersRemoveVmsAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersRemoveVmsAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersUpdateAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.CloudVMClustersUpdateAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.DbNodesActionAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.DbNodesActionAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExadbVMClustersDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExadbVMClustersDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExadbVMClustersRemoveVmsAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExadbVMClustersRemoveVmsAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExadbVMClustersUpdateAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExadbVMClustersUpdateAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExascaleDbNodesActionAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExascaleDbNodesActionAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleDatabaseResourceManagerIdentity + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleDatabaseResourceManagerIdentity + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Adbbackupid + + + Adbscharsetname + + + Adbsncharsetname + + + Autonomousdatabasename + + + Autonomousdbversionsname + + + Cloudexadatainfrastructurename + + + Cloudvmclustername + + + Dbnodeocid + + + Dbserverocid + + + Dbsystemshapename + + + Dnsprivateviewocid + + + Dnsprivatezonename + + + ExadbVMClusterName + + + ExascaleDbNodeName + + + ExascaleDbStorageVaultName + + + FlexComponentName + + + GiMinorVersionName + + + Giversionname + + + Id + + + Location + + + ResourceGroupName + + + SubscriptionId + + + Systemversionname + + + Virtualnetworkaddressname + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsListActivationLinksAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsListActivationLinksAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsUpdateAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.OracleSubscriptionsUpdateAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.VirtualNetworkAddressesDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.VirtualNetworkAddressesDeleteAcceptedResponseHeaders + + + + + + + + + + + + + + + Location + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorAdditionalInfo + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorAdditionalInfo + + + + + + + + + + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetail + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetail + + + + + + + + + + + + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Operation + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Operation + + + + + + + + + + + + + + + + + + + + + ActionType + + + IsDataAction + + + Name + + + Origin + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationDisplay + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationDisplay + + + + + + + + + + + + + + + + + + + + + Description + + + Operation + + + Provider + + + Resource + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Plan + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Plan + + + + + + + + + + + + + + + + + + + + + + + + Name + + + Product + + + PromotionCode + + + Publisher + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ProxyResource + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ProxyResource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource + + + + + + + + + + + + + + + + + + Id + + + Name + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemData + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemData + + + + + + + + + + + + + + + + + + + + + + + + + + + CreatedAt + + + CreatedBy + + + CreatedByType + + + LastModifiedAt + + + LastModifiedBy + + + LastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTags + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ActivationLinks + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ActivationLinks + + + + + + + + + + + + + + + ExistingCloudAccountActivationLink + + + NewCloudAccountActivationLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AddRemoveDbNode + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AddRemoveDbNode + + + + + + + + + + + + DbServer + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringType + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringType + + + + + + + + + + + + + + + + + + High + + + Low + + + Medium + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsType + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsType + + + + + + + + + + + + + + + ApexVersion + + + OrdsVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackup + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackup + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AutonomousDatabaseOcid + + + BackupType + + + DatabaseSizeInTb + + + DbVersion + + + DisplayName + + + IsAutomatic + + + IsRestorable + + + LifecycleDetail + + + LifecycleState + + + Ocid + + + ProvisioningState + + + RetentionPeriodInDay + + + SizeInTb + + + TimeAvailableTil + + + TimeEnded + + + TimeStarted + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupUpdate + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupUpdate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllocatedStorageSizeInTb + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + AvailableUpgradeVersion + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PeerDbId1 + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisionableCpu + + + ProvisioningState + + + Role + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + SupportedRegionsToCloneTo + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeDisasterRecoveryRoleChanged + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + WhitelistedIP + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSet + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetProperties + + + + + + + + + + + + CharacterSet + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCloneProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCloneProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllConnectionStringHigh + + + AllConnectionStringLow + + + AllConnectionStringMedium + + + AllocatedStorageSizeInTb + + + ApexDetailApexVersion + + + ApexDetailOrdsVersion + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + AvailableUpgradeVersion + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + ConnectionStringDedicated + + + ConnectionStringHigh + + + ConnectionStringLow + + + ConnectionStringMedium + + + ConnectionUrlApexUrl + + + ConnectionUrlDatabaseTransformsUrl + + + ConnectionUrlGraphStudioUrl + + + ConnectionUrlMachineLearningNotebookUrl + + + ConnectionUrlMongoDbUrl + + + ConnectionUrlOrdsUrl + + + ConnectionUrlSqlDevWebUrl + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DayOfWeekName + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + LocalStandbyDbLagTimeInSecond + + + LocalStandbyDbLifecycleDetail + + + LocalStandbyDbLifecycleState + + + LocalStandbyDbTimeDataGuardRoleChanged + + + LocalStandbyDbTimeDisasterRecoveryRoleChanged + + + LongTermBackupScheduleIsDisabled + + + LongTermBackupScheduleRepeatCadence + + + LongTermBackupScheduleRetentionPeriodInDay + + + LongTermBackupScheduleTimeOfBackup + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PeerDbId1 + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisionableCpu + + + ProvisioningState + + + RemoteDisasterRecoveryConfigurationDisasterRecoveryType + + + RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup + + + RemoteDisasterRecoveryConfigurationIsSnapshotStandby + + + RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill + + + Role + + + ScheduledOperationScheduledStartTime + + + ScheduledOperationScheduledStopTime + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + SupportedRegionsToCloneTo + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeDisasterRecoveryRoleChanged + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + WhitelistedIP + + + CloneType + + + IsReconnectCloneEnabled + + + IsRefreshableClone + + + RefreshableModel + + + RefreshableStatus + + + Source + + + SourceId + + + TimeUntilReconnectCloneEnabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCrossRegionDisasterRecoveryProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCrossRegionDisasterRecoveryProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllConnectionStringHigh + + + AllConnectionStringLow + + + AllConnectionStringMedium + + + AllocatedStorageSizeInTb + + + ApexDetailApexVersion + + + ApexDetailOrdsVersion + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + AvailableUpgradeVersion + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + ConnectionStringDedicated + + + ConnectionStringHigh + + + ConnectionStringLow + + + ConnectionStringMedium + + + ConnectionUrlApexUrl + + + ConnectionUrlDatabaseTransformsUrl + + + ConnectionUrlGraphStudioUrl + + + ConnectionUrlMachineLearningNotebookUrl + + + ConnectionUrlMongoDbUrl + + + ConnectionUrlOrdsUrl + + + ConnectionUrlSqlDevWebUrl + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DayOfWeekName + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + LocalStandbyDbLagTimeInSecond + + + LocalStandbyDbLifecycleDetail + + + LocalStandbyDbLifecycleState + + + LocalStandbyDbTimeDataGuardRoleChanged + + + LocalStandbyDbTimeDisasterRecoveryRoleChanged + + + LongTermBackupScheduleIsDisabled + + + LongTermBackupScheduleRepeatCadence + + + LongTermBackupScheduleRetentionPeriodInDay + + + LongTermBackupScheduleTimeOfBackup + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PeerDbId1 + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisionableCpu + + + ProvisioningState + + + RemoteDisasterRecoveryConfigurationDisasterRecoveryType + + + RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup + + + RemoteDisasterRecoveryConfigurationIsSnapshotStandby + + + RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill + + + Role + + + ScheduledOperationScheduledStartTime + + + ScheduledOperationScheduledStopTime + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + SupportedRegionsToCloneTo + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeDisasterRecoveryRoleChanged + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + WhitelistedIP + + + IsReplicateAutomaticBackup + + + RemoteDisasterRecoveryType + + + Source + + + SourceId + + + SourceLocation + + + SourceOcid + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseFromBackupTimestampProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseFromBackupTimestampProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllConnectionStringHigh + + + AllConnectionStringLow + + + AllConnectionStringMedium + + + AllocatedStorageSizeInTb + + + ApexDetailApexVersion + + + ApexDetailOrdsVersion + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + AvailableUpgradeVersion + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + ConnectionStringDedicated + + + ConnectionStringHigh + + + ConnectionStringLow + + + ConnectionStringMedium + + + ConnectionUrlApexUrl + + + ConnectionUrlDatabaseTransformsUrl + + + ConnectionUrlGraphStudioUrl + + + ConnectionUrlMachineLearningNotebookUrl + + + ConnectionUrlMongoDbUrl + + + ConnectionUrlOrdsUrl + + + ConnectionUrlSqlDevWebUrl + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DayOfWeekName + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + LocalStandbyDbLagTimeInSecond + + + LocalStandbyDbLifecycleDetail + + + LocalStandbyDbLifecycleState + + + LocalStandbyDbTimeDataGuardRoleChanged + + + LocalStandbyDbTimeDisasterRecoveryRoleChanged + + + LongTermBackupScheduleIsDisabled + + + LongTermBackupScheduleRepeatCadence + + + LongTermBackupScheduleRetentionPeriodInDay + + + LongTermBackupScheduleTimeOfBackup + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PeerDbId1 + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisionableCpu + + + ProvisioningState + + + RemoteDisasterRecoveryConfigurationDisasterRecoveryType + + + RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup + + + RemoteDisasterRecoveryConfigurationIsSnapshotStandby + + + RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill + + + Role + + + ScheduledOperationScheduledStartTime + + + ScheduledOperationScheduledStopTime + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + SupportedRegionsToCloneTo + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeDisasterRecoveryRoleChanged + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + WhitelistedIP + + + CloneType + + + Source + + + SourceId + + + Timestamp + + + UseLatestAvailableBackupTimeStamp + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSet + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetProperties + + + + + + + + + + + + CharacterSet + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActualUsedDataStorageSizeInTb + + + AllConnectionStringHigh + + + AllConnectionStringLow + + + AllConnectionStringMedium + + + AllocatedStorageSizeInTb + + + ApexDetailApexVersion + + + ApexDetailOrdsVersion + + + AutonomousDatabaseId + + + AutonomousMaintenanceScheduleType + + + AvailableUpgradeVersion + + + BackupRetentionPeriodInDay + + + CharacterSet + + + ComputeCount + + + ComputeModel + + + ConnectionStringDedicated + + + ConnectionStringHigh + + + ConnectionStringLow + + + ConnectionStringMedium + + + ConnectionUrlApexUrl + + + ConnectionUrlDatabaseTransformsUrl + + + ConnectionUrlGraphStudioUrl + + + ConnectionUrlMachineLearningNotebookUrl + + + ConnectionUrlMongoDbUrl + + + ConnectionUrlOrdsUrl + + + ConnectionUrlSqlDevWebUrl + + + CpuCoreCount + + + DataBaseType + + + DataSafeStatus + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DayOfWeekName + + + DbVersion + + + DbWorkload + + + DisplayName + + + FailedDataRecoveryInSecond + + + InMemoryAreaInGb + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + IsPreview + + + IsPreviewVersionWithServiceTermsAccepted + + + IsRemoteDataGuardEnabled + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + LocalAdgAutoFailoverMaxDataLossLimit + + + LocalDisasterRecoveryType + + + LocalStandbyDbLagTimeInSecond + + + LocalStandbyDbLifecycleDetail + + + LocalStandbyDbLifecycleState + + + LocalStandbyDbTimeDataGuardRoleChanged + + + LocalStandbyDbTimeDisasterRecoveryRoleChanged + + + LongTermBackupScheduleIsDisabled + + + LongTermBackupScheduleRepeatCadence + + + LongTermBackupScheduleRetentionPeriodInDay + + + LongTermBackupScheduleTimeOfBackup + + + MemoryPerOracleComputeUnitInGb + + + NcharacterSet + + + NextLongTermBackupTimeStamp + + + OciUrl + + + Ocid + + + OpenMode + + + OperationsInsightsStatus + + + PeerDbId + + + PeerDbId1 + + + PermissionLevel + + + PrivateEndpoint + + + PrivateEndpointIP + + + PrivateEndpointLabel + + + ProvisionableCpu + + + ProvisioningState + + + RemoteDisasterRecoveryConfigurationDisasterRecoveryType + + + RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup + + + RemoteDisasterRecoveryConfigurationIsSnapshotStandby + + + RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill + + + Role + + + ScheduledOperationScheduledStartTime + + + ScheduledOperationScheduledStopTime + + + ServiceConsoleUrl + + + SqlWebDeveloperUrl + + + SubnetId + + + SupportedRegionsToCloneTo + + + TimeCreated + + + TimeDataGuardRoleChanged + + + TimeDeletionOfFreeAutonomousDatabase + + + TimeDisasterRecoveryRoleChanged + + + TimeLocalDataGuardEnabled + + + TimeMaintenanceBegin + + + TimeMaintenanceEnd + + + TimeOfLastFailover + + + TimeOfLastRefresh + + + TimeOfLastRefreshPoint + + + TimeOfLastSwitchover + + + TimeReclamationOfFreeAutonomousDatabase + + + UsedDataStorageSizeInGb + + + UsedDataStorageSizeInTb + + + VnetId + + + WhitelistedIP + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummary + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummary + + + + + + + + + + + + + + + + + + + + + + + + LagTimeInSecond + + + LifecycleDetail + + + LifecycleState + + + TimeDataGuardRoleChanged + + + TimeDisasterRecoveryRoleChanged + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AutonomousMaintenanceScheduleType + + + BackupRetentionPeriodInDay + + + ComputeCount + + + CpuCoreCount + + + DataStorageSizeInGb + + + DataStorageSizeInTb + + + DatabaseEdition + + + DisplayName + + + IsAutoScalingEnabled + + + IsAutoScalingForStorageEnabled + + + IsLocalDataGuardEnabled + + + IsMtlsConnectionRequired + + + LicenseModel + + + LocalAdgAutoFailoverMaxDataLossLimit + + + OpenMode + + + PeerDbId + + + PermissionLevel + + + Role + + + WhitelistedIP + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseWalletFile + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseWalletFile + + + + + + + + + + + + WalletFile + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersion + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + DbWorkload + + + IsDefaultForFree + + + IsDefaultForPaid + + + IsFreeTierEnabled + + + IsPaidEnabled + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AzureSubscriptions + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AzureSubscriptions + + + + + + + + + + + + AzureSubscriptionId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudAccountDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudAccountDetails + + + + + + + + + + + + + + + CloudAccountHomeRegion + + + CloudAccountName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + Zone + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ActivatedStorageCount + + + AdditionalStorageCount + + + AvailableStorageSizeInGb + + + ComputeCount + + + ComputeModel + + + CpuCount + + + DataStorageSizeInTb + + + DatabaseServerType + + + DbNodeStorageSizeInGb + + + DbServerVersion + + + DisplayName + + + LastMaintenanceRunId + + + LifecycleDetail + + + LifecycleState + + + MaxCpuCount + + + MaxDataStorageInTb + + + MaxDbNodeStorageSizeInGb + + + MaxMemoryInGb + + + MemorySizeInGb + + + MonthlyDbServerVersion + + + MonthlyStorageServerVersion + + + NextMaintenanceRunId + + + OciUrl + + + Ocid + + + ProvisioningState + + + Shape + + + StorageCount + + + StorageServerType + + + StorageServerVersion + + + TimeCreated + + + TotalStorageSizeInGb + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdate + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdate + + + + + + + + + + + + Zone + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateProperties + + + + + + + + + + + + + + + + + + ComputeCount + + + DisplayName + + + StorageCount + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BackupSubnetCidr + + + CloudExadataInfrastructureId + + + ClusterName + + + CompartmentId + + + ComputeModel + + + ComputeNode + + + CpuCoreCount + + + DataStoragePercentage + + + DataStorageSizeInTb + + + DbNodeStorageSizeInGb + + + DbServer + + + DiskRedundancy + + + DisplayName + + + Domain + + + GiVersion + + + Hostname + + + IsLocalBackupEnabled + + + IsSparseDiskgroupEnabled + + + LastUpdateHistoryEntryId + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + ListenerPort + + + MemorySizeInGb + + + NodeCount + + + NsgUrl + + + OciUrl + + + Ocid + + + OcpuCount + + + ProvisioningState + + + ScanDnsName + + + ScanDnsRecordId + + + ScanIPId + + + ScanListenerPortTcp + + + ScanListenerPortTcpSsl + + + Shape + + + SshPublicKey + + + StorageSizeInGb + + + SubnetId + + + SubnetOcid + + + SystemVersion + + + TimeCreated + + + TimeZone + + + VipId + + + VnetId + + + ZoneId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ComputeNode + + + CpuCoreCount + + + DataStorageSizeInTb + + + DbNodeStorageSizeInGb + + + DisplayName + + + LicenseModel + + + MemorySizeInGb + + + OcpuCount + + + SshPublicKey + + + StorageSizeInGb + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringType + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringType + + + + + + + + + + + + + + + + + + + + + Dedicated + + + High + + + Low + + + Medium + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlType + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ApexUrl + + + DatabaseTransformsUrl + + + GraphStudioUrl + + + MachineLearningNotebookUrl + + + MongoDbUrl + + + OrdsUrl + + + SqlDevWebUrl + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContact + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContact + + + + + + + + + + + + Email + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions + + + + + + + + + + + + + + + + + + IsDiagnosticsEventsEnabled + + + IsHealthMonitoringEnabled + + + IsIncidentLogsEnabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeek + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeek + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdate + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdate + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbActionResponse + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbActionResponse + + + + + + + + + + + + ProvisioningState + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfig + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfig + + + + + + + + + + + + + + + + + + DbName + + + FlashCacheLimit + + + Share + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNode + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeAction + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeAction + + + + + + + + + + + + Action + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeDetails + + + + + + + + + + + + DbNodeId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AdditionalDetail + + + BackupIPId + + + BackupVnic2Id + + + BackupVnicId + + + CpuCoreCount + + + DbNodeStorageSizeInGb + + + DbServerId + + + DbSystemId + + + FaultDomain + + + HostIPId + + + Hostname + + + LifecycleDetail + + + LifecycleState + + + MaintenanceType + + + MemorySizeInGb + + + Ocid + + + ProvisioningState + + + SoftwareStorageSizeInGb + + + TimeCreated + + + TimeMaintenanceWindowEnd + + + TimeMaintenanceWindowStart + + + Vnic2Id + + + VnicId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServer + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetails + + + + + + + + + + + + + + + + + + + + + EstimatedPatchDuration + + + PatchingStatus + + + TimePatchingEnded + + + TimePatchingStarted + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AutonomousVMClusterId + + + AutonomousVirtualMachineId + + + CompartmentId + + + ComputeModel + + + CpuCoreCount + + + DbNodeId + + + DbNodeStorageSizeInGb + + + DisplayName + + + ExadataInfrastructureId + + + LifecycleDetail + + + LifecycleState + + + MaxCpuCount + + + MaxDbNodeStorageInGb + + + MaxMemoryInGb + + + MemorySizeInGb + + + Ocid + + + ProvisioningState + + + Shape + + + TimeCreated + + + VMClusterId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShape + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShape + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AreServerTypesSupported + + + AvailableCoreCount + + + AvailableCoreCountPerNode + + + AvailableDataStorageInTb + + + AvailableDataStoragePerServerInTb + + + AvailableDbNodePerNodeInGb + + + AvailableDbNodeStorageInGb + + + AvailableMemoryInGb + + + AvailableMemoryPerNodeInGb + + + ComputeModel + + + CoreCountIncrement + + + DisplayName + + + MaxStorageCount + + + MaximumNodeCount + + + MinCoreCountPerNode + + + MinDataStorageInTb + + + MinDbNodeStoragePerNodeInGb + + + MinMemoryPerNodeInGb + + + MinStorageCount + + + MinimumCoreCount + + + MinimumNodeCount + + + RuntimeMinimumCoreCount + + + ShapeFamily + + + ShapeName + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DefinedFileSystemConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DefinedFileSystemConfiguration + + + + + + + + + + + + + + + + + + + + + IsBackupPartition + + + IsResizable + + + MinSizeGb + + + MountPoint + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetails + + + + + + + + + + + + + + + + + + + + + DisasterRecoveryType + + + IsReplicateAutomaticBackup + + + IsSnapshotStandby + + + TimeSnapshotStandbyEnabledTill + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateView + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateView + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DisplayName + + + IsProtected + + + LifecycleState + + + Ocid + + + ProvisioningState + + + Self + + + TimeCreated + + + TimeUpdated + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZone + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZone + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + IsProtected + + + LifecycleState + + + Ocid + + + ProvisioningState + + + Self + + + Serial + + + TimeCreated + + + Version + + + ViewId + + + ZoneType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTime + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTime + + + + + + + + + + + + + + + + + + + + + EstimatedDbServerPatchingTime + + + EstimatedNetworkSwitchesPatchingTime + + + EstimatedStorageServerPatchingTime + + + TotalEstimatedPatchingTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig + + + + + + + + + + + + + + + + + + LifecycleDetail + + + LifecycleState + + + Objective + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + Zone + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + BackupSubnetCidr + + + BackupSubnetOcid + + + ClusterName + + + DisplayName + + + Domain + + + EnabledEcpuCount + + + ExascaleDbStorageVaultId + + + GiVersion + + + GridImageOcid + + + GridImageType + + + Hostname + + + LicenseModel + + + LifecycleDetail + + + LifecycleState + + + ListenerPort + + + MemorySizeInGb + + + NodeCount + + + NsgUrl + + + OciUrl + + + Ocid + + + PrivateZoneOcid + + + ProvisioningState + + + ScanDnsName + + + ScanDnsRecordId + + + ScanIPId + + + ScanListenerPortTcp + + + ScanListenerPortTcpSsl + + + Shape + + + SshPublicKey + + + SubnetId + + + SubnetOcid + + + SystemVersion + + + TimeZone + + + TotalEcpuCount + + + VipId + + + VnetId + + + ZoneOcid + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails + + + + + + + + + + + + TotalSizeInGb + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdate + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdate + + + + + + + + + + + + Zone + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateProperties + + + + + + + + + + + + NodeCount + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNode + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AdditionalDetail + + + CpuCoreCount + + + DbNodeStorageSizeInGb + + + FaultDomain + + + Hostname + + + LifecycleState + + + MaintenanceType + + + MemorySizeInGb + + + Ocid + + + SoftwareStorageSizeInGb + + + TimeMaintenanceWindowEnd + + + TimeMaintenanceWindowStart + + + TotalCpuCoreCount + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetails + + + + + + + + + + + + + + + AvailableSizeInGb + + + TotalSizeInGb + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetails + + + + + + + + + + + + TotalSizeInGb + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVault + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVault + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + Zone + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AdditionalFlashCacheInPercent + + + Description + + + DisplayName + + + LifecycleDetail + + + LifecycleState + + + OciUrl + + + Ocid + + + ProvisioningState + + + TimeZone + + + VMClusterCount + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdateTags + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdateTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetails + + + + + + + + + + + + + + + FileSystemSizeGb + + + MountPoint + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponent + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AvailableCoreCount + + + AvailableDbStorageInGb + + + AvailableLocalStorageInGb + + + AvailableMemoryInGb + + + ComputeModel + + + DescriptionSummary + + + HardwareType + + + MinimumCoreCount + + + RuntimeMinimumCoreCount + + + Shape + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GenerateAutonomousDatabaseWalletDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GenerateAutonomousDatabaseWalletDetails + + + + + + + + + + + + + + + GenerateType + + + IsRegional + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersion + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionProperties + + + + + + + + + + + + + + + GridImageOcid + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersion + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionProperties + + + + + + + + + + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails + + + + + + + + + + + + + + + + + + + + + IsDisabled + + + RepeatCadence + + + RetentionPeriodInDay + + + TimeOfBackup + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CustomActionTimeoutInMin + + + HoursOfDay + + + IsCustomActionTimeoutEnabled + + + IsMonthlyPatchingEnabled + + + LeadTimeInWeek + + + PatchingMode + + + Preference + + + WeeksOfMonth + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.Month + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.Month + + + + + + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidr + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidr + + + + + + + + + + + + Source + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscription + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscription + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AddSubscriptionOperationState + + + AzureSubscriptionId + + + CloudAccountId + + + CloudAccountState + + + Intent + + + LastOperationStatusDetail + + + ProductCode + + + ProvisioningState + + + SaasSubscriptionId + + + TermUnit + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdateProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdateProperties + + + + + + + + + + + + + + + Intent + + + ProductCode + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PeerDbDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PeerDbDetails + + + + + + + + + + + + + + + + + + PeerDbId + + + PeerDbLocation + + + PeerDbOcid + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PlanUpdate + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PlanUpdate + + + + + + + + + + + + + + + + + + + + + + + + Name + + + Product + + + PromotionCode + + + Publisher + + + Version + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PortRange + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PortRange + + + + + + + + + + + + + + + Max + + + Min + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PrivateIPAddressesFilter + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PrivateIPAddressesFilter + + + + + + + + + + + + + + + SubnetId + + + VnicId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PrivateIPAddressProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PrivateIPAddressProperties + + + + + + + + + + + + + + + + + + + + + + + + DisplayName + + + HostnameLabel + + + IPAddress + + + Ocid + + + SubnetId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileType + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileType + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ConsumerGroup + + + DisplayName + + + HostFormat + + + IsRegional + + + Protocol + + + SessionMode + + + SyntaxFormat + + + TlsAuthentication + + + Value + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.RestoreAutonomousDatabaseDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.RestoreAutonomousDatabaseDetails + + + + + + + + + + + + Timestamp + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SaasSubscriptionDetails + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SaasSubscriptionDetails + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + IsAutoRenew + + + IsFreeTrial + + + OfferId + + + PlanId + + + PublisherId + + + PurchaserEmailId + + + PurchaserTenantId + + + SaasSubscriptionStatus + + + SubscriptionName + + + TermUnit + + + TimeCreated + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsType + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsType + + + + + + + + + + + + + + + ScheduledStartTime + + + ScheduledStopTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdate + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdate + + + + + + + + + + + + + + + ScheduledStartTime + + + ScheduledStopTime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersion + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersion + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionProperties + + + + + + + + + + + + SystemVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionsFilter + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionsFilter + + + + + + + + + + + + + + + + + + GiVersion + + + IsLatestVersion + + + Shape + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationError + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationError + + + + + + + + + + + + + + + Code + + + Message + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationResult + + + + + + + + + + + + Status + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddress + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddress + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Id + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + Type + + + AzureAsyncOperation + + + RetryAfter + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressListResult + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressProperties + + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Domain + + + IPAddress + + + LifecycleDetail + + + LifecycleState + + + Ocid + + + ProvisioningState + + + TimeAssigned + + + VMOcid + + + + + + + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.nuspec b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.nuspec new file mode 100644 index 000000000000..1bb32a9df764 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.nuspec @@ -0,0 +1,32 @@ + + + + Az.OracleDatabaseResourceManager + 0.1.0 + Microsoft Corporation + Microsoft Corporation + true + https://aka.ms/azps-license + https://github.com/Azure/azure-powershell + Microsoft Azure PowerShell: $(service-name) cmdlets + + Microsoft Corporation. All rights reserved. + Azure ResourceManager ARM PSModule $(service-name) + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.psd1 b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.psd1 new file mode 100644 index 000000000000..9b9f2678d0d8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.psd1 @@ -0,0 +1,24 @@ +@{ + GUID = '12c95d7a-6726-4b9d-b05f-8e348db5bf92' + RootModule = './Az.OracleDatabaseResourceManager.psm1' + ModuleVersion = '0.1.0' + CompatiblePSEditions = 'Core', 'Desktop' + Author = 'Microsoft Corporation' + CompanyName = 'Microsoft Corporation' + Copyright = 'Microsoft Corporation. All rights reserved.' + Description = 'Microsoft Azure PowerShell: OracleDatabaseResourceManager cmdlets' + PowerShellVersion = '5.1' + DotNetFrameworkVersion = '4.7.2' + RequiredAssemblies = './bin/Az.OracleDatabaseResourceManager.private.dll' + FormatsToProcess = './Az.OracleDatabaseResourceManager.format.ps1xml' + FunctionsToExport = 'Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity', 'Add-AzOracleDatabaseResourceManagerCloudVMClusterVM', 'Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription', 'Get-AzOracleDatabaseResourceManagerAutonomouDatabase', 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup', 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet', 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet', 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion', 'Get-AzOracleDatabaseResourceManagerAutonomousDatabase', 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup', 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet', 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet', 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion', 'Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure', 'Get-AzOracleDatabaseResourceManagerCloudVMCluster', 'Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress', 'Get-AzOracleDatabaseResourceManagerDbNode', 'Get-AzOracleDatabaseResourceManagerDbServer', 'Get-AzOracleDatabaseResourceManagerDbSystemShape', 'Get-AzOracleDatabaseResourceManagerDnsPrivateView', 'Get-AzOracleDatabaseResourceManagerDnsPrivateZone', 'Get-AzOracleDatabaseResourceManagerExadbVMCluster', 'Get-AzOracleDatabaseResourceManagerExascaleDbNode', 'Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault', 'Get-AzOracleDatabaseResourceManagerFlexComponent', 'Get-AzOracleDatabaseResourceManagerGiMinorVersion', 'Get-AzOracleDatabaseResourceManagerGiVersion', 'Get-AzOracleDatabaseResourceManagerOracleSubscription', 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink', 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail', 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail', 'Get-AzOracleDatabaseResourceManagerSystemVersion', 'Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress', 'Invoke-AzOracleDatabaseResourceManagerActionDbNode', 'Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode', 'Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase', 'Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase', 'New-AzOracleDatabaseResourceManagerAutonomouDatabase', 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup', 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet', 'New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure', 'New-AzOracleDatabaseResourceManagerCloudVMCluster', 'New-AzOracleDatabaseResourceManagerExadbVMCluster', 'New-AzOracleDatabaseResourceManagerExascaleDbStorageVault', 'New-AzOracleDatabaseResourceManagerOracleSubscription', 'New-AzOracleDatabaseResourceManagerVirtualNetworkAddress', 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabase', 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup', 'Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure', 'Remove-AzOracleDatabaseResourceManagerCloudVMCluster', 'Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM', 'Remove-AzOracleDatabaseResourceManagerExadbVMCluster', 'Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM', 'Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault', 'Remove-AzOracleDatabaseResourceManagerOracleSubscription', 'Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress', 'Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration', 'Restore-AzOracleDatabaseResourceManagerAutonomousDatabase', 'Update-AzOracleDatabaseResourceManagerAutonomousDatabase', 'Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup', 'Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure', 'Update-AzOracleDatabaseResourceManagerCloudVMCluster', 'Update-AzOracleDatabaseResourceManagerExadbVMCluster', 'Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault', 'Update-AzOracleDatabaseResourceManagerOracleSubscription', '*' + AliasesToExport = '*' + PrivateData = @{ + PSData = @{ + Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'OracleDatabaseResourceManager' + LicenseUri = 'https://aka.ms/azps-license' + ProjectUri = 'https://github.com/Azure/azure-powershell' + ReleaseNotes = '' + } + } +} diff --git a/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.psm1 b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.psm1 new file mode 100644 index 000000000000..16013c1d92a9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/Az.OracleDatabaseResourceManager.psm1 @@ -0,0 +1,111 @@ +# region Generated + # ---------------------------------------------------------------------------------- + # Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. + # ---------------------------------------------------------------------------------- + # Load required Az.Accounts module + $accountsName = 'Az.Accounts' + $accountsModule = Get-Module -Name $accountsName + if(-not $accountsModule) { + $localAccountsPath = Join-Path $PSScriptRoot 'generated/modules' + if(Test-Path -Path $localAccountsPath) { + $localAccounts = Get-ChildItem -Path $localAccountsPath -Recurse -Include 'Az.Accounts.psd1' | Select-Object -Last 1 + if($localAccounts) { + $accountsModule = Import-Module -Name ($localAccounts.FullName) -Scope Global -PassThru + } + } + if(-not $accountsModule) { + $hasAdequateVersion = (Get-Module -Name $accountsName -ListAvailable | Where-Object { $_.Version -ge [System.Version]'2.7.5' } | Measure-Object).Count -gt 0 + if($hasAdequateVersion) { + $accountsModule = Import-Module -Name $accountsName -MinimumVersion 2.7.5 -Scope Global -PassThru + } + } + } + + if(-not $accountsModule) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. For installation instructions, please see: https://learn.microsoft.com/powershell/azure/install-az-ps" -ErrorAction Stop + } elseif (($accountsModule.Version -lt [System.Version]'2.7.5') -and (-not $localAccounts)) { + Write-Error "`nThis module requires $accountsName version 2.7.5 or greater. An earlier version of Az.Accounts is imported in the current PowerShell session. If you are running test, please try to add the switch '-RegenerateSupportModule' when executing 'test-module.ps1'. Otherwise please open a new PowerShell session and import this module again.`nAdditionally, this error could indicate that multiple incompatible versions of Azure PowerShell modules are installed on your system. For troubleshooting information, please see: https://aka.ms/azps-version-error" -ErrorAction Stop + } + Write-Information "Loaded Module '$($accountsModule.Name)'" + + # Load the private module dll + $null = Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.OracleDatabaseResourceManager.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module]::Instance + + # Ask for the shared functionality table + $VTable = Register-AzModule + + # Tweaks the pipeline on module load + $instance.OnModuleLoad = $VTable.OnModuleLoad + + # Following two delegates are added for telemetry + $instance.GetTelemetryId = $VTable.GetTelemetryId + $instance.Telemetry = $VTable.Telemetry + + # Delegate to sanitize the output object + $instance.SanitizeOutput = $VTable.SanitizerHandler + + # Delegate to get the telemetry info + $instance.GetTelemetryInfo = $VTable.GetTelemetryInfo + + # Tweaks the pipeline per call + $instance.OnNewRequest = $VTable.OnNewRequest + + # Gets shared parameter values + $instance.GetParameterValue = $VTable.GetParameterValue + + # Allows shared module to listen to events from this module + $instance.EventListener = $VTable.EventListener + + # Gets shared argument completers + $instance.ArgumentCompleter = $VTable.ArgumentCompleter + + # The name of the currently selected Azure profile + $instance.ProfileName = $VTable.ProfileName + + # Load the custom module + $customModulePath = Join-Path $PSScriptRoot './custom/Az.OracleDatabaseResourceManager.custom.psm1' + if(Test-Path $customModulePath) { + $null = Import-Module -Name $customModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = Join-Path $PSScriptRoot './exports' + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } + + # Finalize initialization of this module + $instance.Init(); + Write-Information "Loaded Module '$($instance.Name)'" +# endregion diff --git a/swaggerci/oracle.DefaultTag/MSSharedLibKey.snk b/swaggerci/oracle.DefaultTag/MSSharedLibKey.snk new file mode 100644 index 000000000000..695f1b38774e Binary files /dev/null and b/swaggerci/oracle.DefaultTag/MSSharedLibKey.snk differ diff --git a/swaggerci/oracle.DefaultTag/README.md b/swaggerci/oracle.DefaultTag/README.md new file mode 100644 index 000000000000..89fd47ecd71e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/README.md @@ -0,0 +1,24 @@ + +# Az.OracleDatabaseResourceManager +This directory contains the PowerShell module for the OracleDatabaseResourceManager service. + +--- +## Info +- Modifiable: yes +- Generated: all +- Committed: yes +- Packaged: yes + +--- +## Detail +This module was primarily generated via [AutoRest](https://github.com/Azure/autorest) using the [PowerShell](https://github.com/Azure/autorest.powershell) extension. + +## Module Requirements +- [Az.Accounts module](https://www.powershellgallery.com/packages/Az.Accounts/), version 2.7.5 or greater + +## Authentication +AutoRest does not generate authentication code for the module. Authentication is handled via Az.Accounts by altering the HTTP payload before it is sent. + +## Development +For information on how to develop for `Az.OracleDatabaseResourceManager`, see [how-to.md](how-to.md). + diff --git a/swaggerci/oracle.DefaultTag/build-module.ps1 b/swaggerci/oracle.DefaultTag/build-module.ps1 new file mode 100644 index 000000000000..f90ac5c07d11 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/build-module.ps1 @@ -0,0 +1,175 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks) +$ErrorActionPreference = 'Stop' + +if($PSEdition -ne 'Core') { + Write-Error 'This script requires PowerShell Core to execute. [Note] Generated cmdlets will work in both PowerShell Core or Windows PowerShell.' +} + +if(-not $Isolated -and -not $Debugger) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + + if($LastExitCode -ne 0) { + # Build failed. Don't attempt to run the module. + return + } + + if($Test) { + . (Join-Path $PSScriptRoot 'test-module.ps1') + if($LastExitCode -ne 0) { + # Tests failed. Don't attempt to run the module. + return + } + } + + if($Docs) { + . (Join-Path $PSScriptRoot 'generate-help.ps1') + if($LastExitCode -ne 0) { + # Docs generation failed. Don't attempt to run the module. + return + } + } + + if($Pack) { + . (Join-Path $PSScriptRoot 'pack-module.ps1') + if($LastExitCode -ne 0) { + # Packing failed. Don't attempt to run the module. + return + } + } + + $runModulePath = Join-Path $PSScriptRoot 'run-module.ps1' + if($Code) { + . $runModulePath -Code + } elseif($Run) { + . $runModulePath + } else { + Write-Host -ForegroundColor Cyan "To run this module in an isolated PowerShell session, run the 'run-module.ps1' script or provide the '-Run' parameter to this script." + } + return +} + +$binFolder = Join-Path $PSScriptRoot 'bin' +$objFolder = Join-Path $PSScriptRoot 'obj' + +$isAzure = [System.Convert]::ToBoolean('true') + +if(-not $Debugger) { + Write-Host -ForegroundColor Green 'Cleaning build folders...' + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path $binFolder, $objFolder + + if((Test-Path $binFolder) -or (Test-Path $objFolder)) { + Write-Host -ForegroundColor Cyan 'Did you forget to exit your isolated module session before rebuilding?' + Write-Error 'Unable to clean ''bin'' or ''obj'' folder. A process may have an open handle.' + } + + Write-Host -ForegroundColor Green 'Compiling module...' + $buildConfig = 'Debug' + if($Release) { + $buildConfig = 'Release' + } + dotnet publish $PSScriptRoot --verbosity quiet --configuration $buildConfig /nologo + if($LastExitCode -ne 0) { + Write-Error 'Compilation failed.' + } + + $null = Remove-Item -Recurse -ErrorAction SilentlyContinue -Path (Join-Path $binFolder 'Debug'), (Join-Path $binFolder 'Release') +} + +$dll = Join-Path $PSScriptRoot 'bin/Az.OracleDatabaseResourceManager.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} + +# Load DLL to use build-time cmdlets +$null = Import-Module -Name $dll + +$modulePaths = $dll +$customPsm1 = Join-Path $PSScriptRoot 'custom/Az.OracleDatabaseResourceManager.custom.psm1' +if(Test-Path $customPsm1) { + $modulePaths = @($dll, $customPsm1) +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(Test-Path $exportsFolder) { + $null = Get-ChildItem -Path $exportsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $exportsFolder + +$internalFolder = Join-Path $PSScriptRoot 'internal' +if(Test-Path $internalFolder) { + $null = Get-ChildItem -Path $internalFolder -Recurse -Exclude '*.psm1', 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $internalFolder + +$psd1 = Join-Path $PSScriptRoot './Az.OracleDatabaseResourceManager.psd1' +$guid = Get-ModuleGuid -Psd1Path $psd1 +$moduleName = 'Az.OracleDatabaseResourceManager' +$examplesFolder = Join-Path $PSScriptRoot 'examples' +$null = New-Item -ItemType Directory -Force -Path $examplesFolder + +Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' +$modelCmdlets = @() +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} +if ($modelCmdlets.Count -gt 0) { + . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') + CreateModelCmdlet($modelCmdlets) +} + +if($NoDocs) { + Write-Host -ForegroundColor Green 'Creating exports...' + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ExcludeDocs -ExamplesFolder $examplesFolder +} else { + Write-Host -ForegroundColor Green 'Creating exports and docs...' + $moduleDescription = 'Microsoft Azure PowerShell: OracleDatabaseResourceManager cmdlets' + $docsFolder = Join-Path $PSScriptRoot 'docs' + if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue + } + $null = New-Item -ItemType Directory -Force -Path $docsFolder + $addComplexInterfaceInfo = !$isAzure + Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo +} + +Write-Host -ForegroundColor Green 'Creating format.ps1xml...' +$formatPs1xml = Join-Path $PSScriptRoot './Az.OracleDatabaseResourceManager.format.ps1xml' +Export-FormatPs1xml -FilePath $formatPs1xml + +Write-Host -ForegroundColor Green 'Creating psd1...' +$customFolder = Join-Path $PSScriptRoot 'custom' +Export-Psd1 -ExportsFolder $exportsFolder -CustomFolder $customFolder -Psd1Path $psd1 -ModuleGuid $guid + +Write-Host -ForegroundColor Green 'Creating test stubs...' +$testFolder = Join-Path $PSScriptRoot 'test' +$null = New-Item -ItemType Directory -Force -Path $testFolder +Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFolder $testFolder + +Write-Host -ForegroundColor Green 'Creating example stubs...' +Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder + +if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) +{ + Write-Host -ForegroundColor Green 'Creating ux metadata...' + . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') +} + +if (-not $DisableAfterBuildTasks){ + $afterBuildTasksPath = Join-Path $PSScriptRoot '' + $afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable + if(Test-Path -Path $afterBuildTasksPath -PathType leaf){ + Write-Host -ForegroundColor Green 'Running after build tasks...' + . $afterBuildTasksPath @afterBuildTasksArgs + } +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/check-dependencies.ps1 b/swaggerci/oracle.DefaultTag/check-dependencies.ps1 new file mode 100644 index 000000000000..ec3055201a71 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/check-dependencies.ps1 @@ -0,0 +1,57 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Accounts, [switch]$Pester, [switch]$Resources) +$ErrorActionPreference = 'Stop' + +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +function DownloadModule ([bool]$predicate, [string]$path, [string]$moduleName, [string]$versionMinimum, [string]$requiredVersion) { + if($predicate) { + $module = Get-Module -ListAvailable -Name $moduleName + if((-not $module) -or ($versionMinimum -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -ge [System.Version]$versionMinimum } | Measure-Object).Count -eq 0) -or ($requiredVersion -and ($module | ForEach-Object { $_.Version } | Where-Object { $_ -eq [System.Version]$requiredVersion } | Measure-Object).Count -eq 0)) { + $null = New-Item -ItemType Directory -Force -Path $path + Write-Host -ForegroundColor Green "Installing local $moduleName module into '$path'..." + if ($requiredVersion) { + Find-Module -Name $moduleName -RequiredVersion $requiredVersion -Repository PSGallery | Save-Module -Path $path + }elseif($versionMinimum) { + Find-Module -Name $moduleName -MinimumVersion $versionMinimum -Repository PSGallery | Save-Module -Path $path + } else { + Find-Module -Name $moduleName -Repository PSGallery | Save-Module -Path $path + } + } + } +} + +$ProgressPreference = 'SilentlyContinue' +$all = (@($Accounts.IsPresent, $Pester.IsPresent) | Select-Object -Unique | Measure-Object).Count -eq 1 + +$localModulesPath = Join-Path $PSScriptRoot 'generated/modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +DownloadModule -predicate ($all -or $Accounts) -path $localModulesPath -moduleName 'Az.Accounts' -versionMinimum '2.7.5' +DownloadModule -predicate ($all -or $Pester) -path $localModulesPath -moduleName 'Pester' -requiredVersion '4.10.1' + +$tools = Join-Path $PSScriptRoot 'tools' +$resourceDir = Join-Path $tools 'Resources' +$resourceModule = Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psm1' + +if ($Resources.IsPresent -and ((-not (Test-Path -Path $resourceModule)) -or $RegenerateSupportModule.IsPresent)) { + Write-Host -ForegroundColor Green "Building local Resource module used for test..." + Set-Location $resourceDir + $null = autorest .\README.md --use:@autorest/powershell@3.0.414 --output-folder=$HOME/.PSSharedModules/Resources + $null = Copy-Item custom/* $HOME/.PSSharedModules/Resources/custom/ + Set-Location $HOME/.PSSharedModules/Resources + $null = .\build-module.ps1 + Set-Location $PSScriptRoot +} diff --git a/swaggerci/oracle.DefaultTag/create-model-cmdlets.ps1 b/swaggerci/oracle.DefaultTag/create-model-cmdlets.ps1 new file mode 100644 index 000000000000..6cc42cacbbde --- /dev/null +++ b/swaggerci/oracle.DefaultTag/create-model-cmdlets.ps1 @@ -0,0 +1,167 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +function CreateModelCmdlet { + + param([string[]]$Models) + + if ($Models.Count -eq 0) + { + return + } + + $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated/api') 'Models' + $OutputDir = Join-Path $PSScriptRoot 'custom/autogen-model-cmdlets' + $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.OracleDatabaseResourceManager' + } + + $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs + $Content = '' + $null = $CsFiles | ForEach-Object -Process { if ($_.Name.Split('.').count -eq 2 ) + { $Content += get-content $_.fullname -raw + } } + + $Tree = [Microsoft.CodeAnalysis.CSharp.SyntaxFactory]::ParseCompilationUnit($Content) + $Nodes = $Tree.ChildNodes().ChildNodes() + foreach ($Model in $Models) + { + $InterfaceNode = $Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq "I$Model") } + if ($InterfaceNode.count -eq 0) { + continue + } + # through a queue, we iterate all the parent models. + $Queue = @($InterfaceNode) + $visited = @("I$Model") + $AllInterfaceNodes = @() + while ($Queue.count -ne 0) + { + $AllInterfaceNodes += $Queue[0] + # Baselist contains the direct parent models. + foreach ($parent in $Queue[0].BaseList.Types) + { + if (($parent.Type.Right.Identifier.Value -ne 'IJsonSerializable') -and (-not $visited.Contains($parent.Type.Right.Identifier.Value))) + { + $Queue = [Array]$Queue + ($Nodes | Where-Object { ($_.Keyword.value -eq 'interface') -and ($_.Identifier.value -eq $parent.Type.Right.Identifier.Value) }) + $visited = [Array]$visited + $parent.Type.Right.Identifier.Value + } + } + $first, $Queue = $Queue + } + + $Namespace = $InterfaceNode.Parent.Name + $ObjectType = $Model + $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" + # remove duplicated module name + if ($ObjectType.StartsWith('OracleDatabaseResourceManager')) { + $ModulePrefix = '' + } else { + $ModulePrefix = 'OracleDatabaseResourceManager' + } + $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir + + $ParameterDefineScriptList = New-Object System.Collections.Generic.List[string] + $ParameterAssignScriptList = New-Object System.Collections.Generic.List[string] + foreach ($Node in $AllInterfaceNodes) + { + foreach ($Member in $Node.Members) + { + $Arguments = $Member.AttributeLists.Attributes.ArgumentList.Arguments + $Required = $false + $Description = "" + $Readonly = $False + foreach ($Argument in $Arguments) + { + if ($Argument.NameEquals.Name.Identifier.Value -eq "Required") + { + $Required = $Argument.Expression.Token.Value + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Description") + { + $Description = $Argument.Expression.Token.Value.Trim('.').replace('"', '`"') + } + if ($Argument.NameEquals.Name.Identifier.Value -eq "Readonly") + { + $Readonly = $Argument.Expression.Token.Value + } + } + if ($Readonly) + { + continue + } + $Identifier = $Member.Identifier.Value + $Type = $Member.Type.ToString().replace('?', '').Split("::")[-1] + $ParameterDefinePropertyList = New-Object System.Collections.Generic.List[string] + if ($Required) + { + $ParameterDefinePropertyList.Add("Mandatory") + } + if ($Description -ne "") + { + $ParameterDefinePropertyList.Add("HelpMessage=`"${Description}.`"") + } + $ParameterDefineProperty = [System.String]::Join(", ", $ParameterDefinePropertyList) + # check whether completer is needed + $completer = ''; + if($Type.Split('.').Split('.')[-2] -eq 'Support') { + # If Type is an array, need to strip [] + $strippedType = $Type.Replace('[]', '') + $completer += "`n [ArgumentCompleter([${strippedType}])]" + } + $ParameterDefineScript = " + [Parameter($ParameterDefineProperty)]${completer} + [${Type}] + `$${Identifier}" + $ParameterDefineScriptList.Add($ParameterDefineScript) + $ParameterAssignScriptList.Add(" + if (`$PSBoundParameters.ContainsKey('${Identifier}')) { + `$Object.${Identifier} = `$${Identifier} + }") + } + } + $ParameterDefineScript = $ParameterDefineScriptList | Join-String -Separator "," + $ParameterAssignScript = $ParameterAssignScriptList | Join-String -Separator "" + + $Script = " +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create an in-memory object for ${ObjectType}. +.Description +Create an in-memory object for ${ObjectType}. + +.Outputs +${ObjectTypeWithNamespace} +.Link +https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +#> +function New-Az${ModulePrefix}${ObjectType}Object { + [OutputType('${ObjectTypeWithNamespace}')] + [CmdletBinding(PositionalBinding=`$false)] + Param( +${ParameterDefineScript} + ) + + process { + `$Object = [${ObjectTypeWithNamespace}]::New() +${ParameterAssignScript} + return `$Object + } +} +" + Set-Content -Path $OutputPath -Value $Script + } +} diff --git a/swaggerci/oracle.DefaultTag/custom/Az.OracleDatabaseResourceManager.custom.psm1 b/swaggerci/oracle.DefaultTag/custom/Az.OracleDatabaseResourceManager.custom.psm1 new file mode 100644 index 000000000000..5bff92c0617b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/custom/Az.OracleDatabaseResourceManager.custom.psm1 @@ -0,0 +1,17 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.OracleDatabaseResourceManager.private.dll') + + # Load the internal module + $internalModulePath = Join-Path $PSScriptRoot '../internal/Az.OracleDatabaseResourceManager.internal.psm1' + if(Test-Path $internalModulePath) { + $null = Import-Module -Name $internalModulePath + } + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export script cmdlets + Get-ChildItem -Path $PSScriptRoot -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + Export-ModuleMember -Function (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot) -Alias (Get-ScriptCmdlet -ScriptFolder $PSScriptRoot -AsAlias) +# endregion diff --git a/swaggerci/oracle.DefaultTag/custom/README.md b/swaggerci/oracle.DefaultTag/custom/README.md new file mode 100644 index 000000000000..27d749d689b0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/custom/README.md @@ -0,0 +1,41 @@ +# Custom +This directory contains custom implementation for non-generated cmdlets for the `Az.OracleDatabaseResourceManager` module. Both scripts (`.ps1`) and C# files (`.cs`) can be implemented here. They will be used during the build process in `build-module.ps1`, and create cmdlets into the `../exports` folder. The only generated file into this folder is the `Az.OracleDatabaseResourceManager.custom.psm1`. This file should not be modified. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: yes + +## Details +For `Az.OracleDatabaseResourceManager` to use custom cmdlets, it does this two different ways. We **highly recommend** creating script cmdlets, as they are easier to write and allow access to the other exported cmdlets. C# cmdlets *cannot access exported cmdlets*. + +For C# cmdlets, they are compiled with the rest of the generated low-level cmdlets into the `./bin/Az.OracleDatabaseResourceManager.private.dll`. The names of the cmdlets (methods) and files must follow the `[cmdletName]_[variantName]` syntax used for generated cmdlets. The `variantName` is used as the `ParameterSetName`, so use something appropriate that doesn't clash with already created variant or parameter set names. You cannot use the `ParameterSetName` property in the `Parameter` attribute on C# cmdlets. Each cmdlet must be separated into variants using the same pattern as seen in the `generated/cmdlets` folder. + +For script cmdlets, these are loaded via the `Az.OracleDatabaseResourceManager.custom.psm1`. Then, during the build process, this module is loaded and processed in the same manner as the C# cmdlets. The fundamental difference is the script cmdlets use the `ParameterSetName` attribute and C# cmdlets do not. To create a script cmdlet variant of a generated cmdlet, simply decorate all parameters in the script with the new `ParameterSetName` in the `Parameter` attribute. This will appropriately treat each parameter set as a separate variant when processed to be exported during the build. + +## Purpose +This allows the modules to have cmdlets that were not defined in the REST specification. It also allows combining logic using generated cmdlets. This is a level of customization beyond what can be done using the [readme configuration options](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md) that are currently available. These custom cmdlets are then referenced by the cmdlets created at build-time in the `../exports` folder. + +## Usage +The easiest way currently to start developing custom cmdlets is to copy an existing cmdlet. For C# cmdlets, copy one from the `generated/cmdlets` folder. For script cmdlets, build the project using `build-module.ps1` and copy one of the scripts from the `../exports` folder. After that, if you want to add new parameter sets, follow the guidelines in the `Details` section above. For implementing a new cmdlets, at minimum, please keep these parameters: +- Break +- DefaultProfile +- HttpPipelineAppend +- HttpPipelinePrepend +- Proxy +- ProxyCredential +- ProxyUseDefaultCredentials + +These provide functionality to our HTTP pipeline and other useful features. In script, you can forward these parameters using `$PSBoundParameters` to the other cmdlets you're calling within `Az.OracleDatabaseResourceManager`. For C#, follow the usage seen in the `ProcessRecordAsync` method. + +### Attributes +For processing the cmdlets, we've created some additional attributes: +- `Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.DescriptionAttribute` + - Used in C# cmdlets to provide a high-level description of the cmdlet. This is propagated to reference documentation via [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) in the exported scripts. +- `Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.DoNotExportAttribute` + - Used in C# and script cmdlets to suppress creating an exported cmdlet at build-time. These cmdlets will *not be exposed* by `Az.OracleDatabaseResourceManager`. +- `Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.InternalExportAttribute` + - Used in C# cmdlets to route exported cmdlets to the `../internal`, which are *not exposed* by `Az.OracleDatabaseResourceManager`. For more information, see [README.md](../internal/README.md) in the `../internal` folder. +- `Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ProfileAttribute` + - Used in C# and script cmdlets to define which Azure profiles the cmdlet supports. This is only supported for Azure (`--azure`) modules. \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.md b/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.md new file mode 100644 index 000000000000..94bc7d830609 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.md @@ -0,0 +1,212 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanagercloudexadatainfrastructurestoragecapacity +schema: 2.0.0 +--- + +# Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity + +## SYNOPSIS +Perform add storage capacity on exadata infra + +## SYNTAX + +### Add (Default) +``` +Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity + -Cloudexadatainfrastructurename -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### AddViaIdentity +``` +Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity + -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Perform add storage capacity on exadata infra + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Cloudexadatainfrastructurename +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Add +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: AddViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Add +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Add +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.md b/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.md new file mode 100644 index 000000000000..04f8e1ec9575 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.md @@ -0,0 +1,259 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanagercloudvmclustervm +schema: 2.0.0 +--- + +# Add-AzOracleDatabaseResourceManagerCloudVMClusterVM + +## SYNOPSIS +Add VMs to the VM Cluster + +## SYNTAX + +### AddExpanded (Default) +``` +Add-AzOracleDatabaseResourceManagerCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + -DbServer [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### Add +``` +Add-AzOracleDatabaseResourceManagerCloudVMClusterVM -Cloudvmclustername -ResourceGroupName + -Body [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### AddViaIdentity +``` +Add-AzOracleDatabaseResourceManagerCloudVMClusterVM -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### AddViaIdentityExpanded +``` +Add-AzOracleDatabaseResourceManagerCloudVMClusterVM -InputObject + -DbServer [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Add VMs to the VM Cluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Add/Remove (Virtual Machine) DbNode model +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode +Parameter Sets: Add, AddViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Add, AddExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +Db servers ocids + +```yaml +Type: System.String[] +Parameter Sets: AddExpanded, AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: AddViaIdentity, AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Add, AddExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Add, AddExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.md b/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.md new file mode 100644 index 000000000000..c585d80e4c74 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.md @@ -0,0 +1,228 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanageroraclesubscriptionazuresubscription +schema: 2.0.0 +--- + +# Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription + +## SYNOPSIS +Add Azure Subscriptions + +## SYNTAX + +### AddExpanded (Default) +``` +Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription -AzureSubscriptionId + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### Add +``` +Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription -Body + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### AddViaIdentity +``` +Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription + -InputObject -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### AddViaIdentityExpanded +``` +Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription + -InputObject -AzureSubscriptionId + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Add Azure Subscriptions + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AzureSubscriptionId +Azure Subscription Ids to be updated + +```yaml +Type: System.String[] +Parameter Sets: AddExpanded, AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Azure Subscriptions model +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions +Parameter Sets: Add, AddViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: AddViaIdentity, AddViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Add, AddExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Az.OracleDatabaseResourceManager.md b/swaggerci/oracle.DefaultTag/docs/Az.OracleDatabaseResourceManager.md new file mode 100644 index 000000000000..38859a4b93d2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Az.OracleDatabaseResourceManager.md @@ -0,0 +1,208 @@ +--- +Module Name: Az.OracleDatabaseResourceManager +Module Guid: 12c95d7a-6726-4b9d-b05f-8e348db5bf92 +Download Help Link: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager +Help Version: 1.0.0.0 +Locale: en-US +--- + +# Az.OracleDatabaseResourceManager Module +## Description +Microsoft Azure PowerShell: OracleDatabaseResourceManager cmdlets + +## Az.OracleDatabaseResourceManager Cmdlets +### [Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity](Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.md) +Perform add storage capacity on exadata infra + +### [Add-AzOracleDatabaseResourceManagerCloudVMClusterVM](Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.md) +Add VMs to the VM Cluster + +### [Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription](Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.md) +Add Azure Subscriptions + +### [Get-AzOracleDatabaseResourceManagerAutonomouDatabase](Get-AzOracleDatabaseResourceManagerAutonomouDatabase.md) +List AutonomousDatabase resources by subscription ID + +### [Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup](Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md) +List AutonomousDatabaseBackup resources by AutonomousDatabase + +### [Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet](Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.md) +List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + +### [Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet](Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.md) +List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + +### [Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion](Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.md) +List AutonomousDbVersion resources by SubscriptionLocationResource + +### [Get-AzOracleDatabaseResourceManagerAutonomousDatabase](Get-AzOracleDatabaseResourceManagerAutonomousDatabase.md) +Get a AutonomousDatabase + +### [Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup](Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md) +Get a AutonomousDatabaseBackup + +### [Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet](Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.md) +Get a AutonomousDatabaseCharacterSet + +### [Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet](Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.md) +Get a AutonomousDatabaseNationalCharacterSet + +### [Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion](Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.md) +Get a AutonomousDbVersion + +### [Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure](Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md) +Get a CloudExadataInfrastructure + +### [Get-AzOracleDatabaseResourceManagerCloudVMCluster](Get-AzOracleDatabaseResourceManagerCloudVMCluster.md) +Get a CloudVmCluster + +### [Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress](Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.md) +List Private IP Addresses by the provided filter + +### [Get-AzOracleDatabaseResourceManagerDbNode](Get-AzOracleDatabaseResourceManagerDbNode.md) +Get a DbNode + +### [Get-AzOracleDatabaseResourceManagerDbServer](Get-AzOracleDatabaseResourceManagerDbServer.md) +Get a DbServer + +### [Get-AzOracleDatabaseResourceManagerDbSystemShape](Get-AzOracleDatabaseResourceManagerDbSystemShape.md) +Get a DbSystemShape + +### [Get-AzOracleDatabaseResourceManagerDnsPrivateView](Get-AzOracleDatabaseResourceManagerDnsPrivateView.md) +Get a DnsPrivateView + +### [Get-AzOracleDatabaseResourceManagerDnsPrivateZone](Get-AzOracleDatabaseResourceManagerDnsPrivateZone.md) +Get a DnsPrivateZone + +### [Get-AzOracleDatabaseResourceManagerExadbVMCluster](Get-AzOracleDatabaseResourceManagerExadbVMCluster.md) +Get a ExadbVmCluster + +### [Get-AzOracleDatabaseResourceManagerExascaleDbNode](Get-AzOracleDatabaseResourceManagerExascaleDbNode.md) +Get a ExascaleDbNode + +### [Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault](Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md) +Get a ExascaleDbStorageVault + +### [Get-AzOracleDatabaseResourceManagerFlexComponent](Get-AzOracleDatabaseResourceManagerFlexComponent.md) +Get a FlexComponent + +### [Get-AzOracleDatabaseResourceManagerGiMinorVersion](Get-AzOracleDatabaseResourceManagerGiMinorVersion.md) +Get a GiMinorVersion + +### [Get-AzOracleDatabaseResourceManagerGiVersion](Get-AzOracleDatabaseResourceManagerGiVersion.md) +Get a GiVersion + +### [Get-AzOracleDatabaseResourceManagerOracleSubscription](Get-AzOracleDatabaseResourceManagerOracleSubscription.md) +Get a OracleSubscription + +### [Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink](Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.md) +List Activation Links + +### [Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail](Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.md) +List Cloud Account Details + +### [Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail](Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.md) +List Saas Subscription Details + +### [Get-AzOracleDatabaseResourceManagerSystemVersion](Get-AzOracleDatabaseResourceManagerSystemVersion.md) +Get a SystemVersion + +### [Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress](Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md) +Get a VirtualNetworkAddress + +### [Invoke-AzOracleDatabaseResourceManagerActionDbNode](Invoke-AzOracleDatabaseResourceManagerActionDbNode.md) +VM actions on DbNode of VM Cluster by the provided filter + +### [Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode](Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.md) +VM actions on DbNode of ExadbVmCluster by the provided filter + +### [Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase](Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.md) +This operation shrinks the current allocated storage down to the current actual used data storage. + +### [Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase](Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.md) +Perform switchover action on Autonomous Database + +### [New-AzOracleDatabaseResourceManagerAutonomouDatabase](New-AzOracleDatabaseResourceManagerAutonomouDatabase.md) +Create a AutonomousDatabase + +### [New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup](New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md) +Create a AutonomousDatabaseBackup + +### [New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet](New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.md) +Generate wallet action on Autonomous Database + +### [New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure](New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md) +Create a CloudExadataInfrastructure + +### [New-AzOracleDatabaseResourceManagerCloudVMCluster](New-AzOracleDatabaseResourceManagerCloudVMCluster.md) +Create a CloudVmCluster + +### [New-AzOracleDatabaseResourceManagerExadbVMCluster](New-AzOracleDatabaseResourceManagerExadbVMCluster.md) +Create a ExadbVmCluster + +### [New-AzOracleDatabaseResourceManagerExascaleDbStorageVault](New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md) +Create a ExascaleDbStorageVault + +### [New-AzOracleDatabaseResourceManagerOracleSubscription](New-AzOracleDatabaseResourceManagerOracleSubscription.md) +Create a OracleSubscription + +### [New-AzOracleDatabaseResourceManagerVirtualNetworkAddress](New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md) +Create a VirtualNetworkAddress + +### [Remove-AzOracleDatabaseResourceManagerAutonomousDatabase](Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.md) +Delete a AutonomousDatabase + +### [Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup](Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md) +Delete a AutonomousDatabaseBackup + +### [Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure](Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md) +Delete a CloudExadataInfrastructure + +### [Remove-AzOracleDatabaseResourceManagerCloudVMCluster](Remove-AzOracleDatabaseResourceManagerCloudVMCluster.md) +Delete a CloudVmCluster + +### [Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM](Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.md) +Remove VMs from the VM Cluster + +### [Remove-AzOracleDatabaseResourceManagerExadbVMCluster](Remove-AzOracleDatabaseResourceManagerExadbVMCluster.md) +Delete a ExadbVmCluster + +### [Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM](Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.md) +Remove VMs from the VM Cluster + +### [Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault](Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md) +Delete a ExascaleDbStorageVault + +### [Remove-AzOracleDatabaseResourceManagerOracleSubscription](Remove-AzOracleDatabaseResourceManagerOracleSubscription.md) +Delete a OracleSubscription + +### [Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress](Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md) +Delete a VirtualNetworkAddress + +### [Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration](Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.md) +Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + +### [Restore-AzOracleDatabaseResourceManagerAutonomousDatabase](Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.md) +Restores an Autonomous Database based on the provided request parameters. + +### [Update-AzOracleDatabaseResourceManagerAutonomousDatabase](Update-AzOracleDatabaseResourceManagerAutonomousDatabase.md) +Update a AutonomousDatabase + +### [Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup](Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md) +Update a AutonomousDatabaseBackup + +### [Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure](Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md) +Update a CloudExadataInfrastructure + +### [Update-AzOracleDatabaseResourceManagerCloudVMCluster](Update-AzOracleDatabaseResourceManagerCloudVMCluster.md) +Update a CloudVmCluster + +### [Update-AzOracleDatabaseResourceManagerExadbVMCluster](Update-AzOracleDatabaseResourceManagerExadbVMCluster.md) +Update a ExadbVmCluster + +### [Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault](Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md) +Update a ExascaleDbStorageVault + +### [Update-AzOracleDatabaseResourceManagerOracleSubscription](Update-AzOracleDatabaseResourceManagerOracleSubscription.md) +Update a OracleSubscription + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.md new file mode 100644 index 000000000000..6d24522bd727 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.md @@ -0,0 +1,116 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabase +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomouDatabase + +## SYNOPSIS +List AutonomousDatabase resources by subscription ID + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerAutonomouDatabase [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### List1 +``` +Get-AzOracleDatabaseResourceManagerAutonomouDatabase -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +List AutonomousDatabase resources by subscription ID + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md new file mode 100644 index 000000000000..5550ca3489f0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasebackup +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup + +## SYNOPSIS +List AutonomousDatabaseBackup resources by AutonomousDatabase + +## SYNTAX + +``` +Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +List AutonomousDatabaseBackup resources by AutonomousDatabase + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.md new file mode 100644 index 000000000000..797ece01ff9e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.md @@ -0,0 +1,108 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasecharacterset +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet + +## SYNOPSIS +List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + +## SYNTAX + +``` +Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet -Location + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.md new file mode 100644 index 000000000000..413ab74ff7ef --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.md @@ -0,0 +1,108 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasenationalcharacterset +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet + +## SYNOPSIS +List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + +## SYNTAX + +``` +Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet -Location + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.md new file mode 100644 index 000000000000..c6bf3ba15a90 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.md @@ -0,0 +1,108 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabaseversion +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion + +## SYNOPSIS +List AutonomousDbVersion resources by SubscriptionLocationResource + +## SYNTAX + +``` +Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion -Location [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +List AutonomousDbVersion resources by SubscriptionLocationResource + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..f2dcde673880 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,149 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabase +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomousDatabase + +## SYNOPSIS +Get a AutonomousDatabase + +## SYNTAX + +### Get (Default) +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabase -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabase -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabase + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..e90b2d7b9b70 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md @@ -0,0 +1,165 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasebackup +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup + +## SYNOPSIS +Get a AutonomousDatabaseBackup + +## SYNTAX + +### Get (Default) +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup -Adbbackupid + -Autonomousdatabasename -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup + -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.md new file mode 100644 index 000000000000..07dd8f6facb1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.md @@ -0,0 +1,148 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasecharacterset +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet + +## SYNOPSIS +Get a AutonomousDatabaseCharacterSet + +## SYNTAX + +### Get (Default) +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet -Adbscharsetname -Location + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet + -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseCharacterSet + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Adbscharsetname +AutonomousDatabaseCharacterSet name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.md new file mode 100644 index 000000000000..f5fd17306f4a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.md @@ -0,0 +1,148 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasenationalcharacterset +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet + +## SYNOPSIS +Get a AutonomousDatabaseNationalCharacterSet + +## SYNTAX + +### Get (Default) +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet -Adbsncharsetname + -Location [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet + -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDatabaseNationalCharacterSet + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Adbsncharsetname +AutonomousDatabaseNationalCharacterSets name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.md new file mode 100644 index 000000000000..bb4ab1de7d4f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.md @@ -0,0 +1,148 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabaseversion +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion + +## SYNOPSIS +Get a AutonomousDbVersion + +## SYNTAX + +### Get (Default) +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion -Autonomousdbversionsname + -Location [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion + -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a AutonomousDbVersion + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Autonomousdbversionsname +AutonomousDbVersion name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..cf2526a08ee5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,161 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudexadatainfrastructure +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure + +## SYNOPSIS +Get a CloudExadataInfrastructure + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure + -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..33ec14401e13 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,161 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudvmcluster +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerCloudVMCluster + +## SYNOPSIS +Get a CloudVmCluster + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerCloudVMCluster [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerCloudVMCluster -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerCloudVMCluster -InputObject + [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzOracleDatabaseResourceManagerCloudVMCluster -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a CloudVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.md new file mode 100644 index 000000000000..18fb3ac8df25 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.md @@ -0,0 +1,212 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudvmclusterprivateipaddress +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress + +## SYNOPSIS +List Private IP Addresses by the provided filter + +## SYNTAX + +### ListExpanded (Default) +``` +Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress -Cloudvmclustername + -ResourceGroupName -SubnetId -VnicId [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### List +``` +Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress -Cloudvmclustername + -ResourceGroupName -Body [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List Private IP Addresses by the provided filter + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Body +Private Ip Addresses filter +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter +Parameter Sets: List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Subnet OCID + +```yaml +Type: System.String +Parameter Sets: ListExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnicId +VCN OCID + +```yaml +Type: System.String +Parameter Sets: ListExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbNode.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbNode.md new file mode 100644 index 000000000000..60741264f196 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbNode.md @@ -0,0 +1,170 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbnode +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerDbNode + +## SYNOPSIS +Get a DbNode + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerDbNode -Cloudvmclustername -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerDbNode -Cloudvmclustername -Ocid + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerDbNode -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a DbNode + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DbNode OCID. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Dbnodeocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbServer.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbServer.md new file mode 100644 index 000000000000..33051498b4de --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbServer.md @@ -0,0 +1,170 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbserver +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerDbServer + +## SYNOPSIS +Get a DbServer + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerDbServer -Cloudexadatainfrastructurename + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerDbServer -Cloudexadatainfrastructurename -Ocid + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerDbServer -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a DbServer + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Cloudexadatainfrastructurename +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Ocid +DbServer OCID. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Dbserverocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbSystemShape.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbSystemShape.md new file mode 100644 index 000000000000..27621b88bf9f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDbSystemShape.md @@ -0,0 +1,169 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbsystemshape +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerDbSystemShape + +## SYNOPSIS +Get a DbSystemShape + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerDbSystemShape -Location [-SubscriptionId ] + [-Zone ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerDbSystemShape -Location -Name + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerDbSystemShape -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a DbSystemShape + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +DbSystemShape name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Dbsystemshapename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +Filters the result for the given Azure Availability Zone + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDnsPrivateView.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDnsPrivateView.md new file mode 100644 index 000000000000..7f056ad8adae --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDnsPrivateView.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdnsprivateview +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerDnsPrivateView + +## SYNOPSIS +Get a DnsPrivateView + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerDnsPrivateView -Location [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerDnsPrivateView -Location -Ocid + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerDnsPrivateView -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a DnsPrivateView + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Ocid +DnsPrivateView OCID + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Dnsprivateviewocid + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.md new file mode 100644 index 000000000000..b0e57fe114fd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdnsprivatezone +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerDnsPrivateZone + +## SYNOPSIS +Get a DnsPrivateZone + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerDnsPrivateZone -Location [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerDnsPrivateZone -Location -Name + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerDnsPrivateZone -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a DnsPrivateZone + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +DnsPrivateZone name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Dnsprivatezonename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..454b065fd45a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,161 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexadbvmcluster +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerExadbVMCluster + +## SYNOPSIS +Get a ExadbVmCluster + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerExadbVMCluster [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerExadbVMCluster -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerExadbVMCluster -InputObject + [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzOracleDatabaseResourceManagerExadbVMCluster -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a ExadbVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExadbVmCluster + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ExadbVMClusterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExascaleDbNode.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExascaleDbNode.md new file mode 100644 index 000000000000..c34782b6ee93 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExascaleDbNode.md @@ -0,0 +1,170 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexascaledbnode +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerExascaleDbNode + +## SYNOPSIS +Get a ExascaleDbNode + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerExascaleDbNode -ExadbVMClusterName -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerExascaleDbNode -ExadbVMClusterName -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerExascaleDbNode -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a ExascaleDbNode + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExadbVMClusterName +The name of the ExadbVmCluster + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExascaleDbNode + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ExascaleDbNodeName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..5dbd4a8fcf97 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,161 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexascaledbstoragevault +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault + +## SYNOPSIS +Get a ExascaleDbStorageVault + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault + -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a ExascaleDbStorageVault + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExascaleDbStorageVault + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: ExascaleDbStorageVaultName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerFlexComponent.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerFlexComponent.md new file mode 100644 index 000000000000..7b30c2412b0d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerFlexComponent.md @@ -0,0 +1,169 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerflexcomponent +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerFlexComponent + +## SYNOPSIS +Get a FlexComponent + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerFlexComponent -Location [-SubscriptionId ] + [-Shape ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerFlexComponent -Location -Name + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerFlexComponent -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a FlexComponent + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the FlexComponent + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: FlexComponentName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Shape +If provided, filters the results for the given shape + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerGiMinorVersion.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerGiMinorVersion.md new file mode 100644 index 000000000000..28b34c62372f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerGiMinorVersion.md @@ -0,0 +1,200 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagergiminorversion +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerGiMinorVersion + +## SYNOPSIS +Get a GiMinorVersion + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerGiMinorVersion -Giversionname -Location + [-SubscriptionId ] [-ShapeFamily ] [-Zone ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerGiMinorVersion -Giversionname -Location -Name + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerGiMinorVersion -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a GiMinorVersion + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Giversionname +GiVersion name + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the GiMinorVersion + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: GiMinorVersionName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ShapeFamily +If provided, filters the results to the set of database versions which are supported for the given shape family. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +Filters the result for the given Azure Availability Zone + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerGiVersion.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerGiVersion.md new file mode 100644 index 000000000000..1901b42e7bbe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerGiVersion.md @@ -0,0 +1,184 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagergiversion +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerGiVersion + +## SYNOPSIS +Get a GiVersion + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerGiVersion -Location [-SubscriptionId ] + [-Shape ] [-Zone ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerGiVersion -Location -Name [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerGiVersion -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a GiVersion + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +GiVersion name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Giversionname + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Shape +If provided, filters the results for the given shape + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +Filters the result for the given Azure Availability Zone + +```yaml +Type: System.String +Parameter Sets: List +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..f09bf6844070 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscription +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerOracleSubscription + +## SYNOPSIS +Get a OracleSubscription + +## SYNTAX + +### Get (Default) +``` +Get-AzOracleDatabaseResourceManagerOracleSubscription [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerOracleSubscription -InputObject + [-DefaultProfile ] [] +``` + +### List +``` +Get-AzOracleDatabaseResourceManagerOracleSubscription [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a OracleSubscription + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.md new file mode 100644 index 000000000000..463a67ad221f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptionactivationlink +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink + +## SYNOPSIS +List Activation Links + +## SYNTAX + +``` +Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List Activation Links + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.md new file mode 100644 index 000000000000..0a826ba8cd67 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptioncloudaccountdetail +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail + +## SYNOPSIS +List Cloud Account Details + +## SYNTAX + +``` +Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List Cloud Account Details + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.md new file mode 100644 index 000000000000..a10f001ec8ab --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptionsaasubscriptiondetail +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail + +## SYNOPSIS +List Saas Subscription Details + +## SYNTAX + +``` +Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +List Saas Subscription Details + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerSystemVersion.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerSystemVersion.md new file mode 100644 index 000000000000..80b257caccb0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerSystemVersion.md @@ -0,0 +1,154 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagersystemversion +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerSystemVersion + +## SYNOPSIS +Get a SystemVersion + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerSystemVersion -Location [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerSystemVersion -Location -Name + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerSystemVersion -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a SystemVersion + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of the Azure region. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +SystemVersion name + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Systemversionname + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md new file mode 100644 index 000000000000..58f08ff4564e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md @@ -0,0 +1,170 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagervirtualnetworkaddress +schema: 2.0.0 +--- + +# Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress + +## SYNOPSIS +Get a VirtualNetworkAddress + +## SYNTAX + +### List (Default) +``` +Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress -Cloudvmclustername + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress -Cloudvmclustername -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress -InputObject + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Get a VirtualNetworkAddress + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Virtual IP address hostname. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: Virtualnetworkaddressname + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerActionDbNode.md b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerActionDbNode.md new file mode 100644 index 000000000000..dc4e53f345f9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerActionDbNode.md @@ -0,0 +1,274 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanageractiondbnode +schema: 2.0.0 +--- + +# Invoke-AzOracleDatabaseResourceManagerActionDbNode + +## SYNOPSIS +VM actions on DbNode of VM Cluster by the provided filter + +## SYNTAX + +### ActionExpanded (Default) +``` +Invoke-AzOracleDatabaseResourceManagerActionDbNode -Cloudvmclustername -Dbnodeocid + -ResourceGroupName -Action [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### Action +``` +Invoke-AzOracleDatabaseResourceManagerActionDbNode -Cloudvmclustername -Dbnodeocid + -ResourceGroupName -Body [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ActionViaIdentity +``` +Invoke-AzOracleDatabaseResourceManagerActionDbNode -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### ActionViaIdentityExpanded +``` +Invoke-AzOracleDatabaseResourceManagerActionDbNode -InputObject + -Action [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +VM actions on DbNode of VM Cluster by the provided filter + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Action +Db action + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum +Parameter Sets: ActionExpanded, ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +DbNode action object +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction +Parameter Sets: Action, ActionViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Dbnodeocid +DbNode OCID. + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: ActionViaIdentity, ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.md b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.md new file mode 100644 index 000000000000..5dba0b9e0afc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.md @@ -0,0 +1,275 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanageractionexascaledbnode +schema: 2.0.0 +--- + +# Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode + +## SYNOPSIS +VM actions on DbNode of ExadbVmCluster by the provided filter + +## SYNTAX + +### ActionExpanded (Default) +``` +Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode -ExadbVMClusterName + -ExascaleDbNodeName -ResourceGroupName -Action + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### Action +``` +Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode -ExadbVMClusterName + -ExascaleDbNodeName -ResourceGroupName -Body [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ActionViaIdentity +``` +Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode + -InputObject -Body [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ActionViaIdentityExpanded +``` +Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode + -InputObject -Action [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +VM actions on DbNode of ExadbVmCluster by the provided filter + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Action +Db action + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum +Parameter Sets: ActionExpanded, ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +DbNode action object +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction +Parameter Sets: Action, ActionViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExadbVMClusterName +The name of the ExadbVmCluster + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExascaleDbNodeName +The name of the ExascaleDbNode + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: ActionViaIdentity, ActionViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Action, ActionExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.md new file mode 100644 index 000000000000..e3442a734684 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.md @@ -0,0 +1,212 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanagershrinkautonomoudatabase +schema: 2.0.0 +--- + +# Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase + +## SYNOPSIS +This operation shrinks the current allocated storage down to the current actual used data storage. + +## SYNTAX + +### Shrink (Default) +``` +Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### ShrinkViaIdentity +``` +Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase + -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +This operation shrinks the current allocated storage down to the current actual used data storage. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Shrink +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: ShrinkViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Shrink +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Shrink +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.md new file mode 100644 index 000000000000..906f3dd55d82 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.md @@ -0,0 +1,291 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanagerswitchoverautonomoudatabase +schema: 2.0.0 +--- + +# Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase + +## SYNOPSIS +Perform switchover action on Autonomous Database + +## SYNTAX + +### SwitchoverExpanded (Default) +``` +Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase -Autonomousdatabasename + -ResourceGroupName [-SubscriptionId ] [-PeerDbId ] [-PeerDbLocation ] + [-PeerDbOcid ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### Switchover +``` +Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase -Autonomousdatabasename + -ResourceGroupName -Body [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### SwitchoverViaIdentity +``` +Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase + -InputObject -Body [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### SwitchoverViaIdentityExpanded +``` +Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase + -InputObject [-PeerDbId ] [-PeerDbLocation ] + [-PeerDbOcid ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Perform switchover action on Autonomous Database + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Switchover, SwitchoverExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +PeerDb Details +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails +Parameter Sets: Switchover, SwitchoverViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: SwitchoverViaIdentity, SwitchoverViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbId +The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbLocation +The location of the Disaster Recovery peer database. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbOcid +Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: SwitchoverExpanded, SwitchoverViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Switchover, SwitchoverExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Switchover, SwitchoverExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabase.md new file mode 100644 index 000000000000..d26d24811f97 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabase.md @@ -0,0 +1,841 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabase +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerAutonomouDatabase + +## SYNOPSIS +Create a AutonomousDatabase + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerAutonomouDatabase -Autonomousdatabasename + -ResourceGroupName -Location [-SubscriptionId ] [-AdminPassword ] + [-AutonomousDatabaseId ] [-AutonomousMaintenanceScheduleType ] + [-BackupRetentionPeriodInDay ] [-CharacterSet ] [-ComputeCount ] + [-ComputeModel ] [-CpuCoreCount ] [-CustomerContact ] + [-DatabaseEdition ] [-DataBaseType ] [-DataStorageSizeInGb ] + [-DataStorageSizeInTb ] [-DayOfWeekName ] [-DbVersion ] + [-DbWorkload ] [-DisplayName ] [-IsAutoScalingEnabled] + [-IsAutoScalingForStorageEnabled] [-IsLocalDataGuardEnabled] [-IsMtlsConnectionRequired] + [-IsPreviewVersionWithServiceTermsAccepted] [-LicenseModel ] + [-LocalAdgAutoFailoverMaxDataLossLimit ] [-LongTermBackupScheduleIsDisabled] + [-LongTermBackupScheduleRepeatCadence ] + [-LongTermBackupScheduleRetentionPeriodInDay ] [-LongTermBackupScheduleTimeOfBackup ] + [-NcharacterSet ] [-OpenMode ] [-PeerDbId ] + [-PermissionLevel ] [-PrivateEndpointIP ] [-PrivateEndpointLabel ] + [-Role ] [-ScheduledOperationScheduledStartTime ] + [-ScheduledOperationScheduledStopTime ] [-SubnetId ] [-Tag ] [-VnetId ] + [-WhitelistedIP ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a AutonomousDatabase + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AdminPassword +Admin password. + +```yaml +Type: System.Security.SecureString +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousDatabaseId +Autonomous Database ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousMaintenanceScheduleType +The maintenance schedule type of the Autonomous Database Serverless. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupRetentionPeriodInDay +Retention period, in days, for long-term backups + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CharacterSet +The character set for the autonomous database. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The compute amount (CPUs) available to the database. + +```yaml +Type: System.Single +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeModel +The compute model of the Autonomous Database. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores to be made available to the database. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +Customer Contacts. +To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseEdition +The Oracle Database Edition that applies to the Autonomous databases. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataBaseType +Database type to be created. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInGb +The size, in gigabytes, of the data volume that will be created and attached to the database. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The quantity of data in the database, in terabytes. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DayOfWeekName +Name of the day of the week. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbVersion +A valid Oracle Database version for Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbWorkload +The Autonomous Database workload type + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingEnabled +Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingForStorageEnabled +Indicates if auto scaling is enabled for the Autonomous Database storage. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalDataGuardEnabled +Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMtlsConnectionRequired +Specifies if the Autonomous Database requires mTLS connections. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsPreviewVersionWithServiceTermsAccepted +Specifies if the Autonomous Database preview version is being provisioned. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the Oracle Autonomous Database. +The default is LICENSE_INCLUDED. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocalAdgAutoFailoverMaxDataLossLimit +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 + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleIsDisabled +Indicates if the long-term backup schedule should be deleted. +The default value is `FALSE`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRepeatCadence +The frequency of the long-term backup schedule + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRetentionPeriodInDay +Retention period, in days, for backups. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleTimeOfBackup +The timestamp for the long-term backup schedule. +For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NcharacterSet +The character set for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OpenMode +Indicates the Autonomous Database mode. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbId +The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionLevel +The Autonomous Database permission level. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateEndpointIP +The private endpoint Ip address for the resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateEndpointLabel +The resource's private endpoint label. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Role +The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledOperationScheduledStartTime +auto start time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledOperationScheduledStopTime +auto stop time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Client subnet + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnetId +VNET for network connectivity + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhitelistedIP +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'] + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md new file mode 100644 index 000000000000..fc30bb6a3f15 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md @@ -0,0 +1,233 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabasebackup +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup + +## SYNOPSIS +Create a AutonomousDatabaseBackup + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup -Adbbackupid + -Autonomousdatabasename -ResourceGroupName [-SubscriptionId ] + [-DisplayName ] [-RetentionPeriodInDay ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the backup. +The name does not have to be unique. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionPeriodInDay +Retention period, in days + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.md new file mode 100644 index 000000000000..3e0a7b31352e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.md @@ -0,0 +1,260 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabasewallet +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet + +## SYNOPSIS +Generate wallet action on Autonomous Database + +## SYNTAX + +### GenerateViaIdentity (Default) +``` +New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet + -InputObject -Body + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### Generate +``` +New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet -Autonomousdatabasename + -ResourceGroupName -Body [-SubscriptionId ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +### GenerateExpanded +``` +New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet -Autonomousdatabasename + -ResourceGroupName -Password [-SubscriptionId ] + [-GenerateType ] [-IsRegional] [-DefaultProfile ] [-Confirm] [-WhatIf] + [] +``` + +### GenerateViaIdentityExpanded +``` +New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet + -InputObject -Password [-GenerateType ] + [-IsRegional] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Generate wallet action on Autonomous Database + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Generate, GenerateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Autonomous Database Generate Wallet resource model. +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails +Parameter Sets: Generate, GenerateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GenerateType +The type of wallet to generate. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType +Parameter Sets: GenerateExpanded, GenerateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: GenerateViaIdentity, GenerateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IsRegional +True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: GenerateExpanded, GenerateViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Password +The password to encrypt the keys inside the wallet + +```yaml +Type: System.Security.SecureString +Parameter Sets: GenerateExpanded, GenerateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Generate, GenerateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Generate, GenerateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.String + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..43f31ea76afa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,508 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagercloudexadatainfrastructure +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure + +## SYNOPSIS +Create a CloudExadataInfrastructure + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure -Name -ResourceGroupName + -Location -Zone [-SubscriptionId ] [-ComputeCount ] + [-CustomerContact ] [-DatabaseServerType ] [-DisplayName ] + [-MaintenanceWindowCustomActionTimeoutInMin ] [-MaintenanceWindowDaysOfWeek ] + [-MaintenanceWindowHoursOfDay ] [-MaintenanceWindowIsCustomActionTimeoutEnabled] + [-MaintenanceWindowIsMonthlyPatchingEnabled] [-MaintenanceWindowLeadTimeInWeek ] + [-MaintenanceWindowMonth ] [-MaintenanceWindowPatchingMode ] + [-MaintenanceWindowPreference ] [-MaintenanceWindowWeeksOfMonth ] [-Shape ] + [-StorageCount ] [-StorageServerType ] [-Tag ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The number of compute servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +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. + +To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseServerType +The database server model type of the cloud Exadata infrastructure resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The name for the Exadata infrastructure. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowCustomActionTimeoutInMin +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). + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowDaysOfWeek +Days during the week when maintenance should be performed. +To construct, see NOTES section for MAINTENANCEWINDOWDAYSOFWEEK properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowHoursOfDay +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 + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsCustomActionTimeoutEnabled +If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsMonthlyPatchingEnabled +is Monthly Patching Enabled + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowLeadTimeInWeek +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. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowMonth +Months during the year when maintenance should be performed. +To construct, see NOTES section for MAINTENANCEWINDOWMONTH properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPatchingMode +Cloud Exadata infrastructure node patching method. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPreference +The maintenance window scheduling preference. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowWeeksOfMonth +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. + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Shape +The model name of the cloud Exadata infrastructure resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageCount +The number of storage servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageServerType +The storage server model type of the cloud Exadata infrastructure resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +CloudExadataInfrastructure zones + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..b77ac6ddf87f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,723 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagercloudvmcluster +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerCloudVMCluster + +## SYNOPSIS +Create a CloudVmCluster + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerCloudVMCluster -Name -ResourceGroupName + -Location [-SubscriptionId ] [-BackupSubnetCidr ] + [-CloudExadataInfrastructureId ] [-ClusterName ] [-ComputeNode ] + [-CpuCoreCount ] [-DataCollectionOptionIsDiagnosticsEventsEnabled] + [-DataCollectionOptionIsHealthMonitoringEnabled] [-DataCollectionOptionIsIncidentLogsEnabled] + [-DataStoragePercentage ] [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] + [-DbServer ] [-DisplayName ] [-Domain ] + [-FileSystemConfigurationDetail ] [-GiVersion ] + [-Hostname ] [-IsLocalBackupEnabled] [-IsSparseDiskgroupEnabled] [-LicenseModel ] + [-MemorySizeInGb ] [-NsgCidr ] [-OcpuCount ] [-ScanListenerPortTcp ] + [-ScanListenerPortTcpSsl ] [-SshPublicKey ] [-StorageSizeInGb ] [-SubnetId ] + [-SystemVersion ] [-Tag ] [-TimeZone ] [-VnetId ] [-ZoneId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a CloudVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupSubnetCidr +Client OCI backup subnet CIDR, default is 192.168.252.0/22 + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CloudExadataInfrastructureId +Cloud Exadata Infrastructure ID + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeNode +The list of compute servers to be added to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores enabled on the cloud VM cluster. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsDiagnosticsEventsEnabled +Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsHealthMonitoringEnabled +Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsIncidentLogsEnabled +Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStoragePercentage +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. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The data disk group size to be allocated in TBs. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbNodeStorageSizeInGb +The local node storage to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +The list of DB servers. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display Name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Domain +The domain name for the cloud VM cluster. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileSystemConfigurationDetail +Array of mount path and size. +To construct, see NOTES section for FILESYSTEMCONFIGURATIONDETAIL properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GiVersion +Oracle Grid Infrastructure (GI) software version + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Hostname +The hostname for the cloud VM cluster. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalBackupEnabled +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. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSparseDiskgroupEnabled +If true, sparse disk group is configured for the cloud VM cluster. +If false, sparse disk group is not created. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the cloud VM cluster. +The default is LICENSE_INCLUDED. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MemorySizeInGb +The memory to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NsgCidr +CIDR blocks for additional NSG ingress rules. +The VNET CIDRs used to provision the VM Cluster will be added by default. +To construct, see NOTES section for NSGCIDR properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OcpuCount +The number of OCPU cores to enable on the cloud VM cluster. +Only 1 decimal place is allowed for the fractional part. + +```yaml +Type: System.Single +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcp +The TCP Single Client Access Name (SCAN) port. +The default port is 1521. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcpSsl +The TCPS Single Client Access Name (SCAN) port. +The default port is 2484. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageSizeInGb +The data disk group size to be allocated in GBs per VM. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Client subnet + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemVersion +Operating system version of the image. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeZone +The time zone of the cloud VM cluster. +For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnetId +VNET for network connectivity + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ZoneId +The OCID of the zone the cloud VM cluster is associated with. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..3c319561bde9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,624 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerexadbvmcluster +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerExadbVMCluster + +## SYNOPSIS +Create a ExadbVmCluster + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerExadbVMCluster -Name -ResourceGroupName + -Location [-SubscriptionId ] [-BackupSubnetCidr ] [-ClusterName ] + [-DataCollectionOptionIsDiagnosticsEventsEnabled] [-DataCollectionOptionIsHealthMonitoringEnabled] + [-DataCollectionOptionIsIncidentLogsEnabled] [-DisplayName ] [-Domain ] + [-EnabledEcpuCount ] [-ExascaleDbStorageVaultId ] [-GridImageOcid ] + [-Hostname ] [-LicenseModel ] [-NodeCount ] [-NsgCidr ] + [-PrivateZoneOcid ] [-ScanListenerPortTcp ] [-ScanListenerPortTcpSsl ] + [-Shape ] [-SshPublicKey ] [-SubnetId ] [-SystemVersion ] + [-Tag ] [-TimeZone ] [-TotalEcpuCount ] [-VMFileSystemStorageTotalSizeInGb ] + [-VnetId ] [-Zone ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Create a ExadbVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupSubnetCidr +Client OCI backup subnet CIDR, default is 192.168.252.0/22 + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterName +The cluster name for Exadata VM cluster on Exascale Infrastructure. +The cluster name must begin with an alphabetic character, and may contain hyphens (-). +Underscores (_) are not permitted. +The cluster name can be no longer than 11 characters and is not case sensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsDiagnosticsEventsEnabled +Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsHealthMonitoringEnabled +Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsIncidentLogsEnabled +Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display Name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Domain +A domain name used for the Exadata VM cluster on Exascale Infrastructure + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -EnabledEcpuCount +The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExascaleDbStorageVaultId +The Azure Resource ID of the Exadata Database Storage Vault. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -GridImageOcid +Grid Setup will be done using this Grid Image OCID. +Can be obtained using giMinorVersions API + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Hostname +The hostname for the Exadata VM cluster on Exascale Infrastructure. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. +The default is LICENSE_INCLUDED. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the ExadbVmCluster + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ExadbVMClusterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NodeCount +The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NsgCidr +CIDR blocks for additional NSG ingress rules. +The VNET CIDRs used to provision the VM Cluster will be added by default. +To construct, see NOTES section for NSGCIDR properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PrivateZoneOcid +The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcp +The TCP Single Client Access Name (SCAN) port. +The default port is 1521. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScanListenerPortTcpSsl +The TCPS Single Client Access Name (SCAN) port. +The default port is 2484. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Shape +The shape of the Exadata VM cluster on Exascale Infrastructure resource + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubnetId +Client subnet + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SystemVersion +Operating system version of the image. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeZone +The time zone of the Exadata VM cluster on Exascale Infrastructure. +For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TotalEcpuCount +The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMFileSystemStorageTotalSizeInGb +Total Capacity + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VnetId +VNET for network connectivity + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +The availability zones. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..3a50b3f7d58a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,309 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerexascaledbstoragevault +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerExascaleDbStorageVault + +## SYNOPSIS +Create a ExascaleDbStorageVault + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerExascaleDbStorageVault -Name -ResourceGroupName + -Location [-SubscriptionId ] [-AdditionalFlashCacheInPercent ] + [-Description ] [-DisplayName ] [-HighCapacityDatabaseStorageInputTotalSizeInGb ] + [-Tag ] [-TimeZone ] [-Zone ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a ExascaleDbStorageVault + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AdditionalFlashCacheInPercent +The size of additional Flash Cache in percentage of High Capacity database storage. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Description +Exadata Database Storage Vault description. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the Exadata Database Storage Vault. +The name does not need to be unique. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -HighCapacityDatabaseStorageInputTotalSizeInGb +Total Capacity + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The name of the ExascaleDbStorageVault + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: ExascaleDbStorageVaultName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeZone +The time zone that you want to use for the Exadata Database Storage Vault + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +The availability zones. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..ed2ea8b80d1b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,282 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanageroraclesubscription +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerOracleSubscription + +## SYNOPSIS +Create a OracleSubscription + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerOracleSubscription [-SubscriptionId ] [-Intent ] + [-PlanName ] [-PlanProduct ] [-PlanPromotionCode ] [-PlanPublisher ] + [-PlanVersion ] [-ProductCode ] [-TermUnit ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a OracleSubscription + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Intent +Intent for the update operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanName +A user defined name of the 3rd Party Artifact that is being procured. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanProduct +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanPromotionCode +A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanPublisher +The publisher of the 3rd Party Artifact that is being bought. +E.g. +NewRelic + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanVersion +The version of the desired product/artifact. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductCode +Product code for the term unit + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TermUnit +Term Unit. +P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md new file mode 100644 index 000000000000..1a3227901e17 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md @@ -0,0 +1,231 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagervirtualnetworkaddress +schema: 2.0.0 +--- + +# New-AzOracleDatabaseResourceManagerVirtualNetworkAddress + +## SYNOPSIS +Create a VirtualNetworkAddress + +## SYNTAX + +``` +New-AzOracleDatabaseResourceManagerVirtualNetworkAddress -Cloudvmclustername -Name + -ResourceGroupName [-SubscriptionId ] [-IPAddress ] [-VMOcid ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Create a VirtualNetworkAddress + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IPAddress +Virtual network Address address. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +Virtual IP address hostname. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: Virtualnetworkaddressname + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -VMOcid +Virtual Machine OCID. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/README.md b/swaggerci/oracle.DefaultTag/docs/README.md new file mode 100644 index 000000000000..c35e2d195a97 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/README.md @@ -0,0 +1,11 @@ +# Docs +This directory contains the documentation of the cmdlets for the `Az.OracleDatabaseResourceManager` module. To run documentation generation, use the `generate-help.ps1` script at the root module folder. Files in this folder will *always be overridden on regeneration*. To update documentation examples, please use the `../examples` folder. + +## Info +- Modifiable: no +- Generated: all +- Committed: yes +- Packaged: yes + +## Details +The process of documentation generation loads `Az.OracleDatabaseResourceManager` and analyzes the exported cmdlets from the module. It recognizes the [help comments](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_comment_based_help) that are generated into the scripts in the `../exports` folder. Additionally, when writing custom cmdlets in the `../custom` folder, you can use the help comments syntax, which decorate the exported scripts at build-time. The documentation examples are taken from the `../examples` folder. \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..74547df60767 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,226 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerautonomousdatabase +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerAutonomousDatabase + +## SYNOPSIS +Delete a AutonomousDatabase + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerAutonomousDatabase -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerAutonomousDatabase -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a AutonomousDatabase + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..a16346b26fb5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md @@ -0,0 +1,242 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerautonomousdatabasebackup +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup + +## SYNOPSIS +Delete a AutonomousDatabaseBackup + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup -Adbbackupid + -Autonomousdatabasename -ResourceGroupName [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup + -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..ee247acd5424 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,227 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudexadatainfrastructure +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure + +## SYNOPSIS +Delete a CloudExadataInfrastructure + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure + -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..55f11b9f356d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,226 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudvmcluster +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerCloudVMCluster + +## SYNOPSIS +Delete a CloudVmCluster + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerCloudVMCluster -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerCloudVMCluster -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a CloudVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.md new file mode 100644 index 000000000000..ebda5b0964f5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.md @@ -0,0 +1,259 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudvmclustervm +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM + +## SYNOPSIS +Remove VMs from the VM Cluster + +## SYNTAX + +### RemoveExpanded (Default) +``` +Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM -Cloudvmclustername + -ResourceGroupName -DbServer [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### Remove +``` +Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM -Cloudvmclustername + -ResourceGroupName -Body [-SubscriptionId ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RemoveViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### RemoveViaIdentityExpanded +``` +Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM -InputObject + -DbServer [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Remove VMs from the VM Cluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Add/Remove (Virtual Machine) DbNode model +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode +Parameter Sets: Remove, RemoveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbServer +Db servers ocids + +```yaml +Type: System.String[] +Parameter Sets: RemoveExpanded, RemoveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: RemoveViaIdentity, RemoveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..0b5045e2842c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,226 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexadbvmcluster +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerExadbVMCluster + +## SYNOPSIS +Delete a ExadbVmCluster + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerExadbVMCluster -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerExadbVMCluster -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a ExadbVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExadbVmCluster + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ExadbVMClusterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.md new file mode 100644 index 000000000000..085c80b2ebc2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.md @@ -0,0 +1,261 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexadbvmclustervm +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM + +## SYNOPSIS +Remove VMs from the VM Cluster + +## SYNTAX + +### RemoveViaIdentity (Default) +``` +Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM -InputObject + -Body [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### Remove +``` +Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM -ExadbVMClusterName + -ResourceGroupName -Body [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RemoveExpanded +``` +Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM -ExadbVMClusterName + -ResourceGroupName -DbNode [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RemoveViaIdentityExpanded +``` +Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM -InputObject + -DbNode [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Remove VMs from the VM Cluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. +Applies to Exadata Database Service on Exascale Infrastructure only. +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails +Parameter Sets: Remove, RemoveViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DbNode +The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. +To construct, see NOTES section for DBNODE properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[] +Parameter Sets: RemoveExpanded, RemoveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ExadbVMClusterName +The name of the ExadbVmCluster + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: RemoveViaIdentity, RemoveViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Remove, RemoveExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..8c7d05637be9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,227 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexascaledbstoragevault +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault + +## SYNOPSIS +Delete a ExascaleDbStorageVault + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault -Name -ResourceGroupName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault + -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a ExascaleDbStorageVault + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExascaleDbStorageVault + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: ExascaleDbStorageVaultName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..af138553423b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,194 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanageroraclesubscription +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerOracleSubscription + +## SYNOPSIS +Delete a OracleSubscription + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerOracleSubscription [-SubscriptionId ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerOracleSubscription -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a OracleSubscription + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md new file mode 100644 index 000000000000..4a2d19bb977b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md @@ -0,0 +1,242 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagervirtualnetworkaddress +schema: 2.0.0 +--- + +# Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress + +## SYNOPSIS +Delete a VirtualNetworkAddress + +## SYNTAX + +### Delete (Default) +``` +Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress -Cloudvmclustername -Name + -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress + -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] + [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Delete a VirtualNetworkAddress + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Cloudvmclustername +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +Virtual IP address hostname. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: Virtualnetworkaddressname + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.md b/swaggerci/oracle.DefaultTag/docs/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.md new file mode 100644 index 000000000000..53c1ee501134 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.md @@ -0,0 +1,314 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/rename-azoracledatabaseresourcemanagerautonomoudatabasedisasterrecoveryconfiguration +schema: 2.0.0 +--- + +# Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration + +## SYNOPSIS +Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + +## SYNTAX + +### ChangeExpanded (Default) +``` +Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration + -Autonomousdatabasename -ResourceGroupName [-SubscriptionId ] + [-DisasterRecoveryType ] [-IsReplicateAutomaticBackup] [-IsSnapshotStandby] + [-TimeSnapshotStandbyEnabledTill ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### Change +``` +Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration + -Autonomousdatabasename -ResourceGroupName -Body + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] + [] +``` + +### ChangeViaIdentity +``` +Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration + -InputObject -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### ChangeViaIdentityExpanded +``` +Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration + -InputObject [-DisasterRecoveryType ] + [-IsReplicateAutomaticBackup] [-IsSnapshotStandby] [-TimeSnapshotStandbyEnabledTill ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: Change, ChangeExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Configurations of a Disaster Recovery Details +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails +Parameter Sets: Change, ChangeViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisasterRecoveryType +Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. +Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. +Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType +Parameter Sets: ChangeExpanded, ChangeViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: ChangeViaIdentity, ChangeViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IsReplicateAutomaticBackup +If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. +If false, the backups taken on the Primary are not replicated to the Standby database. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: ChangeExpanded, ChangeViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsSnapshotStandby +Indicates if user wants to convert to a snapshot standby. +For example, true would set a standby database to snapshot standby database. +False would set a snapshot standby database back to regular standby database. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: ChangeExpanded, ChangeViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Change, ChangeExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Change, ChangeExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeSnapshotStandbyEnabledTill +Time and date stored as an RFC 3339 formatted timestamp string. +For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + +```yaml +Type: System.DateTime +Parameter Sets: ChangeExpanded, ChangeViaIdentityExpanded +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/docs/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..0735665ac976 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,259 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/restore-azoracledatabaseresourcemanagerautonomousdatabase +schema: 2.0.0 +--- + +# Restore-AzOracleDatabaseResourceManagerAutonomousDatabase + +## SYNOPSIS +Restores an Autonomous Database based on the provided request parameters. + +## SYNTAX + +### RestoreExpanded (Default) +``` +Restore-AzOracleDatabaseResourceManagerAutonomousDatabase -Name -ResourceGroupName + -Timestamp [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### Restore +``` +Restore-AzOracleDatabaseResourceManagerAutonomousDatabase -Name -ResourceGroupName + -Body [-SubscriptionId ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RestoreViaIdentity +``` +Restore-AzOracleDatabaseResourceManagerAutonomousDatabase + -InputObject -Body + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RestoreViaIdentityExpanded +``` +Restore-AzOracleDatabaseResourceManagerAutonomousDatabase + -InputObject -Timestamp [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Restores an Autonomous Database based on the provided request parameters. + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Body +Details to restore an Oracle Autonomous Database. +To construct, see NOTES section for BODY properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails +Parameter Sets: Restore, RestoreViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: RestoreViaIdentity, RestoreViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: Restore, RestoreExpanded +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Restore, RestoreExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: Restore, RestoreExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Timestamp +The time to restore the database to. + +```yaml +Type: System.DateTime +Parameter Sets: RestoreExpanded, RestoreViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..1e85f3f4e9cb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,677 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerautonomousdatabase +schema: 2.0.0 +--- + +# Update-AzOracleDatabaseResourceManagerAutonomousDatabase + +## SYNOPSIS +Update a AutonomousDatabase + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleDatabaseResourceManagerAutonomousDatabase -Name -ResourceGroupName + [-SubscriptionId ] [-AdminPassword ] + [-AutonomousMaintenanceScheduleType ] + [-BackupRetentionPeriodInDay ] [-ComputeCount ] [-CpuCoreCount ] + [-CustomerContact ] [-DatabaseEdition ] + [-DataStorageSizeInGb ] [-DataStorageSizeInTb ] [-DayOfWeekName ] + [-DisplayName ] [-IsAutoScalingEnabled] [-IsAutoScalingForStorageEnabled] [-IsLocalDataGuardEnabled] + [-IsMtlsConnectionRequired] [-LicenseModel ] [-LocalAdgAutoFailoverMaxDataLossLimit ] + [-LongTermBackupScheduleIsDisabled] [-LongTermBackupScheduleRepeatCadence ] + [-LongTermBackupScheduleRetentionPeriodInDay ] [-LongTermBackupScheduleTimeOfBackup ] + [-OpenMode ] [-PeerDbId ] [-PermissionLevel ] [-Role ] + [-ScheduledOperationScheduledStartTime ] [-ScheduledOperationScheduledStopTime ] + [-Tag ] [-WhitelistedIP ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleDatabaseResourceManagerAutonomousDatabase -InputObject + [-AdminPassword ] [-AutonomousMaintenanceScheduleType ] + [-BackupRetentionPeriodInDay ] [-ComputeCount ] [-CpuCoreCount ] + [-CustomerContact ] [-DatabaseEdition ] + [-DataStorageSizeInGb ] [-DataStorageSizeInTb ] [-DayOfWeekName ] + [-DisplayName ] [-IsAutoScalingEnabled] [-IsAutoScalingForStorageEnabled] [-IsLocalDataGuardEnabled] + [-IsMtlsConnectionRequired] [-LicenseModel ] [-LocalAdgAutoFailoverMaxDataLossLimit ] + [-LongTermBackupScheduleIsDisabled] [-LongTermBackupScheduleRepeatCadence ] + [-LongTermBackupScheduleRetentionPeriodInDay ] [-LongTermBackupScheduleTimeOfBackup ] + [-OpenMode ] [-PeerDbId ] [-PermissionLevel ] [-Role ] + [-ScheduledOperationScheduledStartTime ] [-ScheduledOperationScheduledStopTime ] + [-Tag ] [-WhitelistedIP ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +## DESCRIPTION +Update a AutonomousDatabase + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AdminPassword +Admin password. + +```yaml +Type: System.Security.SecureString +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AutonomousMaintenanceScheduleType +The maintenance schedule type of the Autonomous Database Serverless. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -BackupRetentionPeriodInDay +Retention period, in days, for long-term backups + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The compute amount (CPUs) available to the database. + +```yaml +Type: System.Single +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores to be made available to the database. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +Customer Contacts. +To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DatabaseEdition +The Oracle Database Edition that applies to the Autonomous databases. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInGb +The size, in gigabytes, of the data volume that will be created and attached to the database. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The quantity of data in the database, in terabytes. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DayOfWeekName +Name of the day of the week. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the Autonomous Database. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -IsAutoScalingEnabled +Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsAutoScalingForStorageEnabled +Indicates if auto scaling is enabled for the Autonomous Database storage. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsLocalDataGuardEnabled +Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IsMtlsConnectionRequired +Specifies if the Autonomous Database requires mTLS connections. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the Oracle Autonomous Database. +The default is LICENSE_INCLUDED. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LocalAdgAutoFailoverMaxDataLossLimit +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 + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleIsDisabled +Indicates if the long-term backup schedule should be deleted. +The default value is `FALSE`. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRepeatCadence +The frequency of the long-term backup schedule + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleRetentionPeriodInDay +Retention period, in days, for backups. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -LongTermBackupScheduleTimeOfBackup +The timestamp for the long-term backup schedule. +For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +The database name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: Autonomousdatabasename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OpenMode +Indicates the Autonomous Database mode. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PeerDbId +The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PermissionLevel +The Autonomous Database permission level. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Role +The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledOperationScheduledStartTime +auto start time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ScheduledOperationScheduledStopTime +auto stop time. +value must be of ISO-8601 format HH:mm + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhitelistedIP +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'] + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..ec31e7947938 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md @@ -0,0 +1,259 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerautonomousdatabasebackup +schema: 2.0.0 +--- + +# Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup + +## SYNOPSIS +Update a AutonomousDatabaseBackup + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup -Adbbackupid + -Autonomousdatabasename -ResourceGroupName [-SubscriptionId ] + [-DisplayName ] [-RetentionPeriodInDay ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup + -InputObject [-DisplayName ] [-RetentionPeriodInDay ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a AutonomousDatabaseBackup + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -Adbbackupid +AutonomousDatabaseBackup id + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Autonomousdatabasename +The database name. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The user-friendly name for the backup. +The name does not have to be unique. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -RetentionPeriodInDay +Retention period, in days + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..068a5b28ceb3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,480 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagercloudexadatainfrastructure +schema: 2.0.0 +--- + +# Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure + +## SYNOPSIS +Update a CloudExadataInfrastructure + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure -Name -ResourceGroupName + [-SubscriptionId ] [-ComputeCount ] [-CustomerContact ] + [-DisplayName ] [-MaintenanceWindowCustomActionTimeoutInMin ] + [-MaintenanceWindowDaysOfWeek ] [-MaintenanceWindowHoursOfDay ] + [-MaintenanceWindowIsCustomActionTimeoutEnabled] [-MaintenanceWindowIsMonthlyPatchingEnabled] + [-MaintenanceWindowLeadTimeInWeek ] [-MaintenanceWindowMonth ] + [-MaintenanceWindowPatchingMode ] [-MaintenanceWindowPreference ] + [-MaintenanceWindowWeeksOfMonth ] [-StorageCount ] [-Tag ] [-Zone ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure + -InputObject [-ComputeCount ] + [-CustomerContact ] [-DisplayName ] + [-MaintenanceWindowCustomActionTimeoutInMin ] [-MaintenanceWindowDaysOfWeek ] + [-MaintenanceWindowHoursOfDay ] [-MaintenanceWindowIsCustomActionTimeoutEnabled] + [-MaintenanceWindowIsMonthlyPatchingEnabled] [-MaintenanceWindowLeadTimeInWeek ] + [-MaintenanceWindowMonth ] [-MaintenanceWindowPatchingMode ] + [-MaintenanceWindowPreference ] [-MaintenanceWindowWeeksOfMonth ] + [-StorageCount ] [-Tag ] [-Zone ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a CloudExadataInfrastructure + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeCount +The number of compute servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CustomerContact +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. + +To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +The name for the Exadata infrastructure. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -MaintenanceWindowCustomActionTimeoutInMin +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). + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowDaysOfWeek +Days during the week when maintenance should be performed. +To construct, see NOTES section for MAINTENANCEWINDOWDAYSOFWEEK properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowHoursOfDay +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 + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsCustomActionTimeoutEnabled +If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowIsMonthlyPatchingEnabled +is Monthly Patching Enabled + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowLeadTimeInWeek +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. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowMonth +Months during the year when maintenance should be performed. +To construct, see NOTES section for MAINTENANCEWINDOWMONTH properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPatchingMode +Cloud Exadata infrastructure node patching method. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowPreference +The maintenance window scheduling preference. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MaintenanceWindowWeeksOfMonth +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. + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudExadataInfrastructure name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: Cloudexadatainfrastructurename + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageCount +The number of storage servers for the cloud Exadata infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +CloudExadataInfrastructure zones + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..8c4f7173e31e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,449 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagercloudvmcluster +schema: 2.0.0 +--- + +# Update-AzOracleDatabaseResourceManagerCloudVMCluster + +## SYNOPSIS +Update a CloudVmCluster + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleDatabaseResourceManagerCloudVMCluster -Name -ResourceGroupName + [-SubscriptionId ] [-ComputeNode ] [-CpuCoreCount ] + [-DataCollectionOptionIsDiagnosticsEventsEnabled] [-DataCollectionOptionIsHealthMonitoringEnabled] + [-DataCollectionOptionIsIncidentLogsEnabled] [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] + [-DisplayName ] [-FileSystemConfigurationDetail ] + [-LicenseModel ] [-MemorySizeInGb ] [-OcpuCount ] [-SshPublicKey ] + [-StorageSizeInGb ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleDatabaseResourceManagerCloudVMCluster -InputObject + [-ComputeNode ] [-CpuCoreCount ] [-DataCollectionOptionIsDiagnosticsEventsEnabled] + [-DataCollectionOptionIsHealthMonitoringEnabled] [-DataCollectionOptionIsIncidentLogsEnabled] + [-DataStorageSizeInTb ] [-DbNodeStorageSizeInGb ] [-DisplayName ] + [-FileSystemConfigurationDetail ] [-LicenseModel ] + [-MemorySizeInGb ] [-OcpuCount ] [-SshPublicKey ] [-StorageSizeInGb ] + [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a CloudVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ComputeNode +The list of compute servers to be added to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -CpuCoreCount +The number of CPU cores enabled on the cloud VM cluster. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsDiagnosticsEventsEnabled +Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsHealthMonitoringEnabled +Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataCollectionOptionIsIncidentLogsEnabled +Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DataStorageSizeInTb +The data disk group size to be allocated in TBs. + +```yaml +Type: System.Double +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DbNodeStorageSizeInGb +The local node storage to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DisplayName +Display Name + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -FileSystemConfigurationDetail +Array of mount path and size. +To construct, see NOTES section for FILESYSTEMCONFIGURATIONDETAIL properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -LicenseModel +The Oracle license model that applies to the cloud VM cluster. +The default is LICENSE_INCLUDED. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -MemorySizeInGb +The memory to be allocated in GBs. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Name +CloudVmCluster name + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: Cloudvmclustername + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -OcpuCount +The number of OCPU cores to enable on the cloud VM cluster. +Only 1 decimal place is allowed for the fractional part. + +```yaml +Type: System.Single +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SshPublicKey +The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -StorageSizeInGb +The data disk group size to be allocated in GBs per VM. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..b32ea14d88f9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,257 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerexadbvmcluster +schema: 2.0.0 +--- + +# Update-AzOracleDatabaseResourceManagerExadbVMCluster + +## SYNOPSIS +Update a ExadbVmCluster + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleDatabaseResourceManagerExadbVMCluster -Name -ResourceGroupName + [-SubscriptionId ] [-NodeCount ] [-Tag ] [-Zone ] + [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleDatabaseResourceManagerExadbVMCluster -InputObject + [-NodeCount ] [-Tag ] [-Zone ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a ExadbVmCluster + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExadbVmCluster + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ExadbVMClusterName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NodeCount +The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + +```yaml +Type: System.Int32 +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Zone +The availability zones. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..ea241b12861c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,227 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerexascaledbstoragevault +schema: 2.0.0 +--- + +# Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault + +## SYNOPSIS +Update a ExascaleDbStorageVault + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault -Name -ResourceGroupName + [-SubscriptionId ] [-Tag ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault + -InputObject [-Tag ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a ExascaleDbStorageVault + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Name +The name of the ExascaleDbStorageVault + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: ExascaleDbStorageVaultName + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..a374143f01c8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/docs/Update-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,293 @@ +--- +external help file: +Module Name: Az.OracleDatabaseResourceManager +online version: https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanageroraclesubscription +schema: 2.0.0 +--- + +# Update-AzOracleDatabaseResourceManagerOracleSubscription + +## SYNOPSIS +Update a OracleSubscription + +## SYNTAX + +### UpdateExpanded (Default) +``` +Update-AzOracleDatabaseResourceManagerOracleSubscription [-SubscriptionId ] [-Intent ] + [-PlanName ] [-PlanProduct ] [-PlanPromotionCode ] [-PlanPublisher ] + [-PlanVersion ] [-ProductCode ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] + [-WhatIf] [] +``` + +### UpdateViaIdentityExpanded +``` +Update-AzOracleDatabaseResourceManagerOracleSubscription -InputObject + [-Intent ] [-PlanName ] [-PlanProduct ] [-PlanPromotionCode ] + [-PlanPublisher ] [-PlanVersion ] [-ProductCode ] [-DefaultProfile ] + [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Update a OracleSubscription + +## EXAMPLES + +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +Parameter Sets: UpdateViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Intent +Intent for the update operation + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanName +A user defined name of the 3rd Party Artifact that is being procured. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanProduct +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. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanPromotionCode +A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanPublisher +The publisher of the 3rd Party Artifact that is being bought. +E.g. +NewRelic + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PlanVersion +The version of the desired product/artifact. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ProductCode +Product code for the term unit + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. +The value must be an UUID. + +```yaml +Type: System.String +Parameter Sets: UpdateExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + +## NOTES + +## RELATED LINKS + diff --git a/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.md b/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.md b/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.md b/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbNode.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbNode.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbNode.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbServer.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbServer.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbServer.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbSystemShape.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbSystemShape.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDbSystemShape.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDnsPrivateView.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDnsPrivateView.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDnsPrivateView.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExascaleDbNode.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExascaleDbNode.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExascaleDbNode.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerFlexComponent.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerFlexComponent.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerFlexComponent.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerGiMinorVersion.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerGiMinorVersion.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerGiMinorVersion.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerGiVersion.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerGiVersion.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerGiVersion.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerSystemVersion.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerSystemVersion.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerSystemVersion.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerActionDbNode.md b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerActionDbNode.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerActionDbNode.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.md b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabase.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.md b/swaggerci/oracle.DefaultTag/examples/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/examples/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.md b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerCloudVMCluster.md b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerCloudVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerCloudVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerExadbVMCluster.md b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerExadbVMCluster.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerExadbVMCluster.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerOracleSubscription.md b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerOracleSubscription.md new file mode 100644 index 000000000000..6ee1a83db970 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/examples/Update-AzOracleDatabaseResourceManagerOracleSubscription.md @@ -0,0 +1,22 @@ +### Example 1: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + +### Example 2: {{ Add title here }} +```powershell +{{ Add code here }} +``` + +```output +{{ Add output here }} +``` + +{{ Add description here }} + diff --git a/swaggerci/oracle.DefaultTag/export-surface.ps1 b/swaggerci/oracle.DefaultTag/export-surface.ps1 new file mode 100644 index 000000000000..ef9adc481fab --- /dev/null +++ b/swaggerci/oracle.DefaultTag/export-surface.ps1 @@ -0,0 +1,33 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$IncludeGeneralParameters, [switch]$UseExpandedFormat) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$dll = Join-Path $PSScriptRoot 'bin/Az.OracleDatabaseResourceManager.private.dll' +if(-not (Test-Path $dll)) { + Write-Error "Unable to find output assembly in '$binFolder'." +} +$null = Import-Module -Name $dll + +$moduleName = 'Az.OracleDatabaseResourceManager' +$exportsFolder = Join-Path $PSScriptRoot 'exports' +$resourcesFolder = Join-Path $PSScriptRoot 'resources' + +Export-CmdletSurface -ModuleName $moduleName -CmdletFolder $exportsFolder -OutputFolder $resourcesFolder -IncludeGeneralParameters $IncludeGeneralParameters.IsPresent -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "CmdletSurface file(s) created in '$resourcesFolder'" + +Export-ModelSurface -OutputFolder $resourcesFolder -UseExpandedFormat $UseExpandedFormat.IsPresent +Write-Host -ForegroundColor Green "ModelSurface file created in '$resourcesFolder'" + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.ps1 b/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.ps1 new file mode 100644 index 000000000000..aa253a3f37cc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.ps1 @@ -0,0 +1,235 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Perform add storage capacity on exadata infra +.Description +Perform add storage capacity on exadata infra +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanagercloudexadatainfrastructurestoragecapacity +#> +function Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='Add', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Add', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Cloudexadatainfrastructurename}, + + [Parameter(ParameterSetName='Add', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Add')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Add = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add'; + AddViaIdentity = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity'; + } + if (('Add') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.ps1 b/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.ps1 new file mode 100644 index 000000000000..7ece7cb3025a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.ps1 @@ -0,0 +1,262 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Add VMs to the VM Cluster +.Description +Add VMs to the VM Cluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Add/Remove (Virtual Machine) DbNode model + DbServer : Db servers ocids + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanagercloudvmclustervm +#> +function Add-AzOracleDatabaseResourceManagerCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Add', Mandatory)] + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Add', Mandatory)] + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Add')] + [Parameter(ParameterSetName='AddExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode] + # Add/Remove (Virtual Machine) DbNode model + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Add = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_Add'; + AddExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded'; + AddViaIdentity = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity'; + AddViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded'; + } + if (('Add', 'AddExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.ps1 b/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.ps1 new file mode 100644 index 000000000000..0033e9414712 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.ps1 @@ -0,0 +1,247 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Add Azure Subscriptions +.Description +Add Azure Subscriptions +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Azure Subscriptions model + AzureSubscriptionId : Azure Subscription Ids to be updated + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanageroraclesubscriptionazuresubscription +#> +function Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Add')] + [Parameter(ParameterSetName='AddExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions] + # Azure Subscriptions model + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # Azure Subscription Ids to be updated + ${AzureSubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Add = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add'; + AddExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded'; + AddViaIdentity = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity'; + AddViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded'; + } + if (('Add', 'AddExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.ps1 new file mode 100644 index 000000000000..675fbb5f1b3c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.ps1 @@ -0,0 +1,178 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List AutonomousDatabase resources by subscription ID +.Description +List AutonomousDatabase resources by subscription ID +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabase +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabase_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabase_List1'; + } + if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.ps1 new file mode 100644 index 000000000000..f484dbf35d8f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.ps1 @@ -0,0 +1,183 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List AutonomousDatabaseBackup resources by AutonomousDatabase +.Description +List AutonomousDatabaseBackup resources by AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasebackup +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.ps1 new file mode 100644 index 000000000000..f5e97cee38fd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.ps1 @@ -0,0 +1,176 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource +.Description +List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasecharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.ps1 new file mode 100644 index 000000000000..beaea5acd696 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.ps1 @@ -0,0 +1,176 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource +.Description +List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasenationalcharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.ps1 new file mode 100644 index 000000000000..441c01fafce3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.ps1 @@ -0,0 +1,176 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List AutonomousDbVersion resources by SubscriptionLocationResource +.Description +List AutonomousDbVersion resources by SubscriptionLocationResource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabaseversion +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 new file mode 100644 index 000000000000..dd069da5ea95 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 @@ -0,0 +1,224 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabase +.Description +Get a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabase_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 new file mode 100644 index 000000000000..721e167e8966 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabaseBackup +.Description +Get a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasebackup +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.ps1 new file mode 100644 index 000000000000..c62a4f8a0ddb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.ps1 @@ -0,0 +1,222 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabaseCharacterSet +.Description +Get a AutonomousDatabaseCharacterSet +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasecharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseCharacterSet name + ${Adbscharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.ps1 new file mode 100644 index 000000000000..7422ea89891d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.ps1 @@ -0,0 +1,222 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDatabaseNationalCharacterSet +.Description +Get a AutonomousDatabaseNationalCharacterSet +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasenationalcharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseNationalCharacterSets name + ${Adbsncharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.ps1 new file mode 100644 index 000000000000..835a8608a5bb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.ps1 @@ -0,0 +1,222 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a AutonomousDbVersion +.Description +Get a AutonomousDbVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabaseversion +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDbVersion name + ${Autonomousdbversionsname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..0d41989fdd3b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a CloudExadataInfrastructure +.Description +Get a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 new file mode 100644 index 000000000000..756b308ff157 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a CloudVmCluster +.Description +Get a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudvmcluster +#> +function Get-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.ps1 new file mode 100644 index 000000000000..ec66389512e5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.ps1 @@ -0,0 +1,213 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List Private IP Addresses by the provided filter +.Description +List Private IP Addresses by the provided filter +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Private Ip Addresses filter + SubnetId : Subnet OCID + VnicId : VCN OCID +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudvmclusterprivateipaddress +#> +function Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties])] +[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter] + # Private Ip Addresses filter + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ListExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Subnet OCID + ${SubnetId}, + + [Parameter(ParameterSetName='ListExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VCN OCID + ${VnicId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List'; + ListExpanded = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded'; + } + if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbNode.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbNode.ps1 new file mode 100644 index 000000000000..2968a2fc0d8a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbNode.ps1 @@ -0,0 +1,234 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DbNode +.Description +Get a DbNode +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbnode +#> +function Get-AzOracleDatabaseResourceManagerDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dbnodeocid')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbNode OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbNode_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbNode_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbNode_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbServer.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbServer.ps1 new file mode 100644 index 000000000000..32ee6bb82dd7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbServer.ps1 @@ -0,0 +1,234 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DbServer +.Description +Get a DbServer +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbserver +#> +function Get-AzOracleDatabaseResourceManagerDbServer { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Cloudexadatainfrastructurename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dbserverocid')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbServer OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbServer_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbServer_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbServer_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbSystemShape.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbSystemShape.ps1 new file mode 100644 index 000000000000..d4e46bcf4219 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDbSystemShape.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DbSystemShape +.Description +Get a DbSystemShape +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbsystemshape +#> +function Get-AzOracleDatabaseResourceManagerDbSystemShape { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dbsystemshapename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbSystemShape name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [System.String] + # Filters the result for the given Azure Availability Zone + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbSystemShape_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbSystemShape_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDnsPrivateView.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDnsPrivateView.ps1 new file mode 100644 index 000000000000..aad3a9ef0414 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDnsPrivateView.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DnsPrivateView +.Description +Get a DnsPrivateView +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdnsprivateview +#> +function Get-AzOracleDatabaseResourceManagerDnsPrivateView { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dnsprivateviewocid')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DnsPrivateView OCID + ${Ocid}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateView_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateView_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.ps1 new file mode 100644 index 000000000000..d4e3b2e9ec45 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a DnsPrivateZone +.Description +Get a DnsPrivateZone +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdnsprivatezone +#> +function Get-AzOracleDatabaseResourceManagerDnsPrivateZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dnsprivatezonename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DnsPrivateZone name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateZone_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateZone_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 new file mode 100644 index 000000000000..e013939e8784 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a ExadbVmCluster +.Description +Get a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexadbvmcluster +#> +function Get-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExascaleDbNode.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExascaleDbNode.ps1 new file mode 100644 index 000000000000..11d7b1e1b25b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExascaleDbNode.ps1 @@ -0,0 +1,234 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a ExascaleDbNode +.Description +Get a ExascaleDbNode +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexascaledbnode +#> +function Get-AzOracleDatabaseResourceManagerExascaleDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${ExadbVMClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExascaleDbNodeName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbNode + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbNode_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbNode_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 new file mode 100644 index 000000000000..c92c944c0aa3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 @@ -0,0 +1,229 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a ExascaleDbStorageVault +.Description +Get a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerFlexComponent.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerFlexComponent.ps1 new file mode 100644 index 000000000000..17727dac6d44 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerFlexComponent.ps1 @@ -0,0 +1,233 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a FlexComponent +.Description +Get a FlexComponent +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerflexcomponent +#> +function Get-AzOracleDatabaseResourceManagerFlexComponent { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('FlexComponentName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the FlexComponent + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes] + # If provided, filters the results for the given shape + ${Shape}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerFlexComponent_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerFlexComponent_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerGiMinorVersion.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerGiMinorVersion.ps1 new file mode 100644 index 000000000000..1e7c88f6650e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerGiMinorVersion.ps1 @@ -0,0 +1,246 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a GiMinorVersion +.Description +Get a GiMinorVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagergiminorversion +#> +function Get-AzOracleDatabaseResourceManagerGiMinorVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # GiVersion name + ${Giversionname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('GiMinorVersionName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the GiMinorVersion + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily] + # If provided, filters the results to the set of database versions which are supported for the given shape family. + ${ShapeFamily}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [System.String] + # Filters the result for the given Azure Availability Zone + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiMinorVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiMinorVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerGiVersion.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerGiVersion.ps1 new file mode 100644 index 000000000000..5c7254d82b43 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerGiVersion.ps1 @@ -0,0 +1,239 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a GiVersion +.Description +Get a GiVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagergiversion +#> +function Get-AzOracleDatabaseResourceManagerGiVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Giversionname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # GiVersion name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes] + # If provided, filters the results for the given shape + ${Shape}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [System.String] + # Filters the result for the given Azure Availability Zone + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiVersion_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscription.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscription.ps1 new file mode 100644 index 000000000000..63c0fb772f77 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscription.ps1 @@ -0,0 +1,212 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a OracleSubscription +.Description +Get a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscription +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscription_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscription_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.ps1 new file mode 100644 index 000000000000..50da3892f26b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.ps1 @@ -0,0 +1,182 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List Activation Links +.Description +List Activation Links +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptionactivationlink +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.ps1 new file mode 100644 index 000000000000..33f1c94a1df1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.ps1 @@ -0,0 +1,182 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List Cloud Account Details +.Description +List Cloud Account Details +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptioncloudaccountdetail +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.ps1 new file mode 100644 index 000000000000..b498143b9e74 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.ps1 @@ -0,0 +1,182 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List Saas Subscription Details +.Description +List Saas Subscription Details +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptionsaasubscriptiondetail +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerSystemVersion.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerSystemVersion.ps1 new file mode 100644 index 000000000000..be9a31e7b075 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerSystemVersion.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a SystemVersion +.Description +Get a SystemVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagersystemversion +#> +function Get-AzOracleDatabaseResourceManagerSystemVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Systemversionname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # SystemVersion name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerSystemVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerSystemVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 new file mode 100644 index 000000000000..73506978cddf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 @@ -0,0 +1,234 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Get a VirtualNetworkAddress +.Description +Get a VirtualNetworkAddress +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagervirtualnetworkaddress +#> +function Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Virtualnetworkaddressname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # Virtual IP address hostname. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerActionDbNode.ps1 b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerActionDbNode.ps1 new file mode 100644 index 000000000000..3942cdf5a2d1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerActionDbNode.ps1 @@ -0,0 +1,269 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +VM actions on DbNode of VM Cluster by the provided filter +.Description +VM actions on DbNode of VM Cluster by the provided filter +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : DbNode action object + Action : Db action + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanageractiondbnode +#> +function Invoke-AzOracleDatabaseResourceManagerActionDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode])] +[CmdletBinding(DefaultParameterSetName='ActionExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbNode OCID. + ${Dbnodeocid}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Action')] + [Parameter(ParameterSetName='ActionExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Action', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction] + # DbNode action object + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum] + # Db action + ${Action}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Action = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_Action'; + ActionExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_ActionExpanded'; + ActionViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity'; + ActionViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded'; + } + if (('Action', 'ActionExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.ps1 b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.ps1 new file mode 100644 index 000000000000..fdd431ed00e7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.ps1 @@ -0,0 +1,269 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +VM actions on DbNode of ExadbVmCluster by the provided filter +.Description +VM actions on DbNode of ExadbVmCluster by the provided filter +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : DbNode action object + Action : Db action + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanageractionexascaledbnode +#> +function Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState])] +[CmdletBinding(DefaultParameterSetName='ActionExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${ExadbVMClusterName}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbNode + ${ExascaleDbNodeName}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Action')] + [Parameter(ParameterSetName='ActionExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Action', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction] + # DbNode action object + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum] + # Db action + ${Action}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Action = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_Action'; + ActionExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded'; + ActionViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity'; + ActionViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded'; + } + if (('Action', 'ActionExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.ps1 new file mode 100644 index 000000000000..2163f3644893 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.ps1 @@ -0,0 +1,235 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +This operation shrinks the current allocated storage down to the current actual used data storage. +.Description +This operation shrinks the current allocated storage down to the current actual used data storage. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanagershrinkautonomoudatabase +#> +function Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='Shrink', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Shrink', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Shrink', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Shrink')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ShrinkViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Shrink = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink'; + ShrinkViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity'; + } + if (('Shrink') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.ps1 new file mode 100644 index 000000000000..76d45cef531d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.ps1 @@ -0,0 +1,277 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Perform switchover action on Autonomous Database +.Description +Perform switchover action on Autonomous Database +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : PeerDb Details + [PeerDbId ]: The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + [PeerDbLocation ]: The location of the Disaster Recovery peer database. + [PeerDbOcid ]: Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanagerswitchoverautonomoudatabase +#> +function Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='SwitchoverExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Switchover', Mandatory)] + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Switchover', Mandatory)] + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Switchover')] + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='SwitchoverViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Switchover', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SwitchoverViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails] + # PeerDb Details + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The location of the Disaster Recovery peer database. + ${PeerDbLocation}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbOcid}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Switchover = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover'; + SwitchoverExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded'; + SwitchoverViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity'; + SwitchoverViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded'; + } + if (('Switchover', 'SwitchoverExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabase.ps1 new file mode 100644 index 000000000000..828c53c8eab5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabase.ps1 @@ -0,0 +1,477 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a AutonomousDatabase +.Description +Create a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabase +#> +function New-AzOracleDatabaseResourceManagerAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Autonomous Database ID + ${AutonomousDatabaseId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The character set for the autonomous database. + ${CharacterSet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel] + # The compute model of the Autonomous Database. + ${ComputeModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # Customer Contacts. + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType] + # Database type to be created. + ${DataBaseType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A valid Oracle Database version for Autonomous Database. + ${DbVersion}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType] + # The Autonomous Database workload type + ${DbWorkload}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database preview version is being provisioned. + ${IsPreviewVersionWithServiceTermsAccepted}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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 + ${LocalAdgAutoFailoverMaxDataLossLimit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if the long-term backup schedule should be deleted. + # The default value is `FALSE`. + ${LongTermBackupScheduleIsDisabled}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType] + # The frequency of the long-term backup schedule + ${LongTermBackupScheduleRepeatCadence}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for backups. + ${LongTermBackupScheduleRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # The timestamp for the long-term backup schedule. + # For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + ${LongTermBackupScheduleTimeOfBackup}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The character set for the Autonomous Database. + ${NcharacterSet}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType] + # Indicates the Autonomous Database mode. + ${OpenMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType] + # The Autonomous Database permission level. + ${PermissionLevel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The private endpoint Ip address for the resource. + ${PrivateEndpointIP}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The resource's private endpoint label. + ${PrivateEndpointLabel}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType] + # The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + ${Role}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStartTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStopTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # 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'] + ${WhitelistedIP}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.ps1 new file mode 100644 index 000000000000..00c51ef2f96d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.ps1 @@ -0,0 +1,214 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a AutonomousDatabaseBackup +.Description +Create a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabasebackup +#> +function New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the backup. + # The name does not have to be unique. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days + ${RetentionPeriodInDay}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.ps1 new file mode 100644 index 000000000000..a8fddd30091c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.ps1 @@ -0,0 +1,266 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Generate wallet action on Autonomous Database +.Description +Generate wallet action on Autonomous Database +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.String +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Autonomous Database Generate Wallet resource model. + Password : The password to encrypt the keys inside the wallet + [GenerateType ]: The type of wallet to generate. + [IsRegional ]: True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabasewallet +#> +function New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='GenerateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Generate', Mandatory)] + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Generate')] + [Parameter(ParameterSetName='GenerateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Generate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails] + # Autonomous Database Generate Wallet resource model. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Security.SecureString] + # The password to encrypt the keys inside the wallet + ${Password}, + + [Parameter(ParameterSetName='GenerateExpanded')] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType] + # The type of wallet to generate. + ${GenerateType}, + + [Parameter(ParameterSetName='GenerateExpanded')] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + ${IsRegional}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Generate = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate'; + GenerateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded'; + GenerateViaIdentity = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity'; + GenerateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded'; + } + if (('Generate', 'GenerateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..07d4ee70412d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 @@ -0,0 +1,353 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a CloudExadataInfrastructure +.Description +Create a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : 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. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # 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. + # + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The database server model type of the cloud Exadata infrastructure resource. + ${DatabaseServerType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWDAYSOFWEEK properties and create a hash table. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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 + ${MaintenanceWindowHoursOfDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]] + # Months during the year when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWMONTH properties and create a hash table. + ${MaintenanceWindowMonth}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The model name of the cloud Exadata infrastructure resource. + ${Shape}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The storage server model type of the cloud Exadata infrastructure resource. + ${StorageServerType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 new file mode 100644 index 000000000000..5076f737686d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 @@ -0,0 +1,437 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a CloudVmCluster +.Description +Create a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +FILESYSTEMCONFIGURATIONDETAIL : Array of mount path and size. + [FileSystemSizeGb ]: Size of the VM + [MountPoint ]: Mount path + +NSGCIDR : CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + Source : Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + [DestinationPortRangeMax ]: 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. + [DestinationPortRangeMin ]: The minimum port number, which must not be greater than the maximum port number. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagercloudvmcluster +#> +function New-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client OCI backup subnet CIDR, default is 192.168.252.0/22 + ${BackupSubnetCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Cloud Exadata Infrastructure ID + ${CloudExadataInfrastructureId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # 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. + ${ClusterName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The list of compute servers to be added to the cloud VM cluster. + ${ComputeNode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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. + ${DataStoragePercentage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The list of DB servers. + ${DbServer}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The domain name for the cloud VM cluster. + ${Domain}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]] + # Array of mount path and size. + # To construct, see NOTES section for FILESYSTEMCONFIGURATIONDETAIL properties and create a hash table. + ${FileSystemConfigurationDetail}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Oracle Grid Infrastructure (GI) software version + ${GiVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The hostname for the cloud VM cluster. + ${Hostname}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # 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. + ${IsLocalBackupEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, sparse disk group is configured for the cloud VM cluster. + # If false, sparse disk group is not created. + ${IsSparseDiskgroupEnabled}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]] + # CIDR blocks for additional NSG ingress rules. + # The VNET CIDRs used to provision the VM Cluster will be added by default. + # To construct, see NOTES section for NSGCIDR properties and create a hash table. + ${NsgCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCP Single Client Access Name (SCAN) port. + # The default port is 1521. + ${ScanListenerPortTcp}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCPS Single Client Access Name (SCAN) port. + # The default port is 2484. + ${ScanListenerPortTcpSsl}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The data disk group size to be allocated in GBs per VM. + ${StorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Operating system version of the image. + ${SystemVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The time zone of the cloud VM cluster. + # For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + ${TimeZone}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The OCID of the zone the cloud VM cluster is associated with. + ${ZoneId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 new file mode 100644 index 000000000000..6f27f2afc850 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 @@ -0,0 +1,388 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a ExadbVmCluster +.Description +Create a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NSGCIDR : CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + Source : Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + [DestinationPortRangeMax ]: 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. + [DestinationPortRangeMin ]: The minimum port number, which must not be greater than the maximum port number. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerexadbvmcluster +#> +function New-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client OCI backup subnet CIDR, default is 192.168.252.0/22 + ${BackupSubnetCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The cluster name for Exadata VM cluster on Exascale Infrastructure. + # The cluster name must begin with an alphabetic character, and may contain hyphens (-). + # Underscores (_) are not permitted. + # The cluster name can be no longer than 11 characters and is not case sensitive. + ${ClusterName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A domain name used for the Exadata VM cluster on Exascale Infrastructure + ${Domain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + ${EnabledEcpuCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure Resource ID of the Exadata Database Storage Vault. + ${ExascaleDbStorageVaultId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Grid Setup will be done using this Grid Image OCID. + # Can be obtained using giMinorVersions API + ${GridImageOcid}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The hostname for the Exadata VM cluster on Exascale Infrastructure. + ${Hostname}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + ${NodeCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]] + # CIDR blocks for additional NSG ingress rules. + # The VNET CIDRs used to provision the VM Cluster will be added by default. + # To construct, see NOTES section for NSGCIDR properties and create a hash table. + ${NsgCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + ${PrivateZoneOcid}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCP Single Client Access Name (SCAN) port. + # The default port is 1521. + ${ScanListenerPortTcp}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCPS Single Client Access Name (SCAN) port. + # The default port is 2484. + ${ScanListenerPortTcpSsl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The shape of the Exadata VM cluster on Exascale Infrastructure resource + ${Shape}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + ${SshPublicKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Operating system version of the image. + ${SystemVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The time zone of the Exadata VM cluster on Exascale Infrastructure. + # For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + ${TimeZone}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + ${TotalEcpuCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Total Capacity + ${VMFileSystemStorageTotalSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The availability zones. + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 new file mode 100644 index 000000000000..52afdc6314be --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 @@ -0,0 +1,247 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a ExascaleDbStorageVault +.Description +Create a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function New-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The size of additional Flash Cache in percentage of High Capacity database storage. + ${AdditionalFlashCacheInPercent}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Exadata Database Storage Vault description. + ${Description}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the Exadata Database Storage Vault. + # The name does not need to be unique. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Total Capacity + ${HighCapacityDatabaseStorageInputTotalSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The time zone that you want to use for the Exadata Database Storage Vault + ${TimeZone}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The availability zones. + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerOracleSubscription.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerOracleSubscription.ps1 new file mode 100644 index 000000000000..f548a2bc3349 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerOracleSubscription.ps1 @@ -0,0 +1,237 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a OracleSubscription +.Description +Create a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanageroraclesubscription +#> +function New-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent] + # Intent for the update operation + ${Intent}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A user defined name of the 3rd Party Artifact that is being procured. + ${PlanName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # 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. + ${PlanProduct}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + ${PlanPromotionCode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The publisher of the 3rd Party Artifact that is being bought. + # E.g. + # NewRelic + ${PlanPublisher}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The version of the desired product/artifact. + ${PlanVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Product code for the term unit + ${ProductCode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Term Unit. + # P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + ${TermUnit}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 new file mode 100644 index 000000000000..b7acf41b52a1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 @@ -0,0 +1,214 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Create a VirtualNetworkAddress +.Description +Create a VirtualNetworkAddress +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagervirtualnetworkaddress +#> +function New-AzOracleDatabaseResourceManagerVirtualNetworkAddress { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(Mandatory)] + [Alias('Virtualnetworkaddressname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # Virtual IP address hostname. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Virtual network Address address. + ${IPAddress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Virtual Machine OCID. + ${VMOcid}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/ProxyCmdletDefinitions.ps1 b/swaggerci/oracle.DefaultTag/exports/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..6476b24aadd0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,15814 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Perform add storage capacity on exadata infra +.Description +Perform add storage capacity on exadata infra +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanagercloudexadatainfrastructurestoragecapacity +#> +function Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='Add', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Add', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Cloudexadatainfrastructurename}, + + [Parameter(ParameterSetName='Add', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Add')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Add = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add'; + AddViaIdentity = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity'; + } + if (('Add') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Add VMs to the VM Cluster +.Description +Add VMs to the VM Cluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Add/Remove (Virtual Machine) DbNode model + DbServer : Db servers ocids + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanagercloudvmclustervm +#> +function Add-AzOracleDatabaseResourceManagerCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Add', Mandatory)] + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Add', Mandatory)] + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Add')] + [Parameter(ParameterSetName='AddExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode] + # Add/Remove (Virtual Machine) DbNode model + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Add = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_Add'; + AddExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded'; + AddViaIdentity = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity'; + AddViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded'; + } + if (('Add', 'AddExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Add Azure Subscriptions +.Description +Add Azure Subscriptions +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Azure Subscriptions model + AzureSubscriptionId : Azure Subscription Ids to be updated + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/add-azoracledatabaseresourcemanageroraclesubscriptionazuresubscription +#> +function Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='AddExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Add')] + [Parameter(ParameterSetName='AddExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Add', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='AddViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions] + # Azure Subscriptions model + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='AddExpanded', Mandatory)] + [Parameter(ParameterSetName='AddViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # Azure Subscription Ids to be updated + ${AzureSubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Add = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add'; + AddExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded'; + AddViaIdentity = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity'; + AddViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded'; + } + if (('Add', 'AddExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List AutonomousDatabaseBackup resources by AutonomousDatabase +.Description +List AutonomousDatabaseBackup resources by AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasebackup +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource +.Description +List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasecharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource +.Description +List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabasenationalcharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List AutonomousDbVersion resources by SubscriptionLocationResource +.Description +List AutonomousDbVersion resources by SubscriptionLocationResource +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabaseversion +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List AutonomousDatabase resources by subscription ID +.Description +List AutonomousDatabase resources by subscription ID +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomoudatabase +#> +function Get-AzOracleDatabaseResourceManagerAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabase_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomouDatabase_List1'; + } + if (('List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabaseBackup +.Description +Get a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasebackup +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabaseCharacterSet +.Description +Get a AutonomousDatabaseCharacterSet +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasecharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseCharacterSet name + ${Adbscharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabaseNationalCharacterSet +.Description +Get a AutonomousDatabaseNationalCharacterSet +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabasenationalcharacterset +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseNationalCharacterSets name + ${Adbsncharsetname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDbVersion +.Description +Get a AutonomousDbVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabaseversion +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDbVersion name + ${Autonomousdbversionsname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a AutonomousDatabase +.Description +Get a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Get-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabase_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a CloudExadataInfrastructure +.Description +Get a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List Private IP Addresses by the provided filter +.Description +List Private IP Addresses by the provided filter +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Private Ip Addresses filter + SubnetId : Subnet OCID + VnicId : VCN OCID +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudvmclusterprivateipaddress +#> +function Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties])] +[CmdletBinding(DefaultParameterSetName='ListExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='List', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter] + # Private Ip Addresses filter + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ListExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Subnet OCID + ${SubnetId}, + + [Parameter(ParameterSetName='ListExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VCN OCID + ${VnicId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List'; + ListExpanded = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded'; + } + if (('List', 'ListExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a CloudVmCluster +.Description +Get a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagercloudvmcluster +#> +function Get-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerCloudVMCluster_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DbNode +.Description +Get a DbNode +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbnode +#> +function Get-AzOracleDatabaseResourceManagerDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dbnodeocid')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbNode OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbNode_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbNode_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbNode_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DbServer +.Description +Get a DbServer +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbserver +#> +function Get-AzOracleDatabaseResourceManagerDbServer { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Cloudexadatainfrastructurename}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dbserverocid')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbServer OCID. + ${Ocid}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbServer_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbServer_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbServer_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DbSystemShape +.Description +Get a DbSystemShape +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdbsystemshape +#> +function Get-AzOracleDatabaseResourceManagerDbSystemShape { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dbsystemshapename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbSystemShape name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [System.String] + # Filters the result for the given Azure Availability Zone + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbSystemShape_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDbSystemShape_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DnsPrivateView +.Description +Get a DnsPrivateView +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdnsprivateview +#> +function Get-AzOracleDatabaseResourceManagerDnsPrivateView { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dnsprivateviewocid')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DnsPrivateView OCID + ${Ocid}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateView_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateView_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a DnsPrivateZone +.Description +Get a DnsPrivateZone +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerdnsprivatezone +#> +function Get-AzOracleDatabaseResourceManagerDnsPrivateZone { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Dnsprivatezonename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DnsPrivateZone name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateZone_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerDnsPrivateZone_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a ExadbVmCluster +.Description +Get a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexadbvmcluster +#> +function Get-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExadbVMCluster_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a ExascaleDbNode +.Description +Get a ExascaleDbNode +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexascaledbnode +#> +function Get-AzOracleDatabaseResourceManagerExascaleDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${ExadbVMClusterName}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExascaleDbNodeName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbNode + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbNode_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbNode_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a ExascaleDbStorageVault +.Description +Get a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List1', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Parameter(ParameterSetName='List1')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_List'; + List1 = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a FlexComponent +.Description +Get a FlexComponent +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagerflexcomponent +#> +function Get-AzOracleDatabaseResourceManagerFlexComponent { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('FlexComponentName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the FlexComponent + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes] + # If provided, filters the results for the given shape + ${Shape}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerFlexComponent_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerFlexComponent_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a GiMinorVersion +.Description +Get a GiMinorVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagergiminorversion +#> +function Get-AzOracleDatabaseResourceManagerGiMinorVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # GiVersion name + ${Giversionname}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('GiMinorVersionName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the GiMinorVersion + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily] + # If provided, filters the results to the set of database versions which are supported for the given shape family. + ${ShapeFamily}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [System.String] + # Filters the result for the given Azure Availability Zone + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiMinorVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiMinorVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a GiVersion +.Description +Get a GiVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagergiversion +#> +function Get-AzOracleDatabaseResourceManagerGiVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Giversionname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # GiVersion name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='List')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes] + # If provided, filters the results for the given shape + ${Shape}, + + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Query')] + [System.String] + # Filters the result for the given Azure Availability Zone + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiVersion_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerGiVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List Activation Links +.Description +List Activation Links +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptionactivationlink +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List Cloud Account Details +.Description +List Cloud Account Details +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptioncloudaccountdetail +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +List Saas Subscription Details +.Description +List Saas Subscription Details +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscriptionsaasubscriptiondetail +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a OracleSubscription +.Description +Get a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroraclesubscription +#> +function Get-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscription_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOracleSubscription_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a SystemVersion +.Description +Get a SystemVersion +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagersystemversion +#> +function Get-AzOracleDatabaseResourceManagerSystemVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the Azure region. + ${Location}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Systemversionname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # SystemVersion name + ${Name}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerSystemVersion_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerSystemVersion_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Get a VirtualNetworkAddress +.Description +Get a VirtualNetworkAddress +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanagervirtualnetworkaddress +#> +function Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('Virtualnetworkaddressname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # Virtual IP address hostname. + ${Name}, + + [Parameter(ParameterSetName='Get', Mandatory)] + [Parameter(ParameterSetName='List', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Get')] + [Parameter(ParameterSetName='List')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Get = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress_Get'; + GetViaIdentity = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity'; + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +VM actions on DbNode of VM Cluster by the provided filter +.Description +VM actions on DbNode of VM Cluster by the provided filter +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : DbNode action object + Action : Db action + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanageractiondbnode +#> +function Invoke-AzOracleDatabaseResourceManagerActionDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode])] +[CmdletBinding(DefaultParameterSetName='ActionExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # DbNode OCID. + ${Dbnodeocid}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Action')] + [Parameter(ParameterSetName='ActionExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Action', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction] + # DbNode action object + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum] + # Db action + ${Action}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Action = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_Action'; + ActionExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_ActionExpanded'; + ActionViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity'; + ActionViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded'; + } + if (('Action', 'ActionExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +VM actions on DbNode of ExadbVmCluster by the provided filter +.Description +VM actions on DbNode of ExadbVmCluster by the provided filter +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : DbNode action object + Action : Db action + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanageractionexascaledbnode +#> +function Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState])] +[CmdletBinding(DefaultParameterSetName='ActionExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${ExadbVMClusterName}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbNode + ${ExascaleDbNodeName}, + + [Parameter(ParameterSetName='Action', Mandatory)] + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Action')] + [Parameter(ParameterSetName='ActionExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Action', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ActionViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction] + # DbNode action object + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ActionExpanded', Mandatory)] + [Parameter(ParameterSetName='ActionViaIdentityExpanded', Mandatory)] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum] + # Db action + ${Action}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Action = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_Action'; + ActionExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded'; + ActionViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity'; + ActionViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded'; + } + if (('Action', 'ActionExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +This operation shrinks the current allocated storage down to the current actual used data storage. +.Description +This operation shrinks the current allocated storage down to the current actual used data storage. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanagershrinkautonomoudatabase +#> +function Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='Shrink', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Shrink', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Shrink', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Shrink')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ShrinkViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Shrink = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink'; + ShrinkViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity'; + } + if (('Shrink') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Perform switchover action on Autonomous Database +.Description +Perform switchover action on Autonomous Database +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : PeerDb Details + [PeerDbId ]: The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + [PeerDbLocation ]: The location of the Disaster Recovery peer database. + [PeerDbOcid ]: Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/invoke-azoracledatabaseresourcemanagerswitchoverautonomoudatabase +#> +function Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='SwitchoverExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Switchover', Mandatory)] + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Switchover', Mandatory)] + [Parameter(ParameterSetName='SwitchoverExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Switchover')] + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='SwitchoverViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Switchover', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='SwitchoverViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails] + # PeerDb Details + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The location of the Disaster Recovery peer database. + ${PeerDbLocation}, + + [Parameter(ParameterSetName='SwitchoverExpanded')] + [Parameter(ParameterSetName='SwitchoverViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbOcid}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Switchover = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover'; + SwitchoverExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded'; + SwitchoverViaIdentity = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity'; + SwitchoverViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded'; + } + if (('Switchover', 'SwitchoverExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a AutonomousDatabaseBackup +.Description +Create a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabasebackup +#> +function New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the backup. + # The name does not have to be unique. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days + ${RetentionPeriodInDay}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Generate wallet action on Autonomous Database +.Description +Generate wallet action on Autonomous Database +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.String +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Autonomous Database Generate Wallet resource model. + Password : The password to encrypt the keys inside the wallet + [GenerateType ]: The type of wallet to generate. + [IsRegional ]: True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabasewallet +#> +function New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet { +[OutputType([System.String])] +[CmdletBinding(DefaultParameterSetName='GenerateViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Generate', Mandatory)] + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Generate', Mandatory)] + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Generate')] + [Parameter(ParameterSetName='GenerateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Generate', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GenerateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails] + # Autonomous Database Generate Wallet resource model. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='GenerateExpanded', Mandatory)] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Security.SecureString] + # The password to encrypt the keys inside the wallet + ${Password}, + + [Parameter(ParameterSetName='GenerateExpanded')] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType] + # The type of wallet to generate. + ${GenerateType}, + + [Parameter(ParameterSetName='GenerateExpanded')] + [Parameter(ParameterSetName='GenerateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + ${IsRegional}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Generate = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate'; + GenerateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded'; + GenerateViaIdentity = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity'; + GenerateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded'; + } + if (('Generate', 'GenerateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a AutonomousDatabase +.Description +Create a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerautonomoudatabase +#> +function New-AzOracleDatabaseResourceManagerAutonomouDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Autonomous Database ID + ${AutonomousDatabaseId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The character set for the autonomous database. + ${CharacterSet}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel] + # The compute model of the Autonomous Database. + ${ComputeModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # Customer Contacts. + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType] + # Database type to be created. + ${DataBaseType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A valid Oracle Database version for Autonomous Database. + ${DbVersion}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType] + # The Autonomous Database workload type + ${DbWorkload}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database preview version is being provisioned. + ${IsPreviewVersionWithServiceTermsAccepted}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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 + ${LocalAdgAutoFailoverMaxDataLossLimit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if the long-term backup schedule should be deleted. + # The default value is `FALSE`. + ${LongTermBackupScheduleIsDisabled}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType] + # The frequency of the long-term backup schedule + ${LongTermBackupScheduleRepeatCadence}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for backups. + ${LongTermBackupScheduleRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # The timestamp for the long-term backup schedule. + # For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + ${LongTermBackupScheduleTimeOfBackup}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The character set for the Autonomous Database. + ${NcharacterSet}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType] + # Indicates the Autonomous Database mode. + ${OpenMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType] + # The Autonomous Database permission level. + ${PermissionLevel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The private endpoint Ip address for the resource. + ${PrivateEndpointIP}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The resource's private endpoint label. + ${PrivateEndpointLabel}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType] + # The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + ${Role}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStartTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStopTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # 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'] + ${WhitelistedIP}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a CloudExadataInfrastructure +.Description +Create a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : 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. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter(Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # 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. + # + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The database server model type of the cloud Exadata infrastructure resource. + ${DatabaseServerType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWDAYSOFWEEK properties and create a hash table. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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 + ${MaintenanceWindowHoursOfDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]] + # Months during the year when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWMONTH properties and create a hash table. + ${MaintenanceWindowMonth}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The model name of the cloud Exadata infrastructure resource. + ${Shape}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The storage server model type of the cloud Exadata infrastructure resource. + ${StorageServerType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a CloudVmCluster +.Description +Create a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +FILESYSTEMCONFIGURATIONDETAIL : Array of mount path and size. + [FileSystemSizeGb ]: Size of the VM + [MountPoint ]: Mount path + +NSGCIDR : CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + Source : Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + [DestinationPortRangeMax ]: 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. + [DestinationPortRangeMin ]: The minimum port number, which must not be greater than the maximum port number. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagercloudvmcluster +#> +function New-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client OCI backup subnet CIDR, default is 192.168.252.0/22 + ${BackupSubnetCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Cloud Exadata Infrastructure ID + ${CloudExadataInfrastructureId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # 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. + ${ClusterName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The list of compute servers to be added to the cloud VM cluster. + ${ComputeNode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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. + ${DataStoragePercentage}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The list of DB servers. + ${DbServer}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The domain name for the cloud VM cluster. + ${Domain}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]] + # Array of mount path and size. + # To construct, see NOTES section for FILESYSTEMCONFIGURATIONDETAIL properties and create a hash table. + ${FileSystemConfigurationDetail}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Oracle Grid Infrastructure (GI) software version + ${GiVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The hostname for the cloud VM cluster. + ${Hostname}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # 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. + ${IsLocalBackupEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, sparse disk group is configured for the cloud VM cluster. + # If false, sparse disk group is not created. + ${IsSparseDiskgroupEnabled}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]] + # CIDR blocks for additional NSG ingress rules. + # The VNET CIDRs used to provision the VM Cluster will be added by default. + # To construct, see NOTES section for NSGCIDR properties and create a hash table. + ${NsgCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCP Single Client Access Name (SCAN) port. + # The default port is 1521. + ${ScanListenerPortTcp}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCPS Single Client Access Name (SCAN) port. + # The default port is 2484. + ${ScanListenerPortTcpSsl}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The data disk group size to be allocated in GBs per VM. + ${StorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Operating system version of the image. + ${SystemVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The time zone of the cloud VM cluster. + # For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + ${TimeZone}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The OCID of the zone the cloud VM cluster is associated with. + ${ZoneId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a ExadbVmCluster +.Description +Create a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +NSGCIDR : CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + Source : Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + [DestinationPortRangeMax ]: 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. + [DestinationPortRangeMin ]: The minimum port number, which must not be greater than the maximum port number. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerexadbvmcluster +#> +function New-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client OCI backup subnet CIDR, default is 192.168.252.0/22 + ${BackupSubnetCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The cluster name for Exadata VM cluster on Exascale Infrastructure. + # The cluster name must begin with an alphabetic character, and may contain hyphens (-). + # Underscores (_) are not permitted. + # The cluster name can be no longer than 11 characters and is not case sensitive. + ${ClusterName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A domain name used for the Exadata VM cluster on Exascale Infrastructure + ${Domain}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + ${EnabledEcpuCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure Resource ID of the Exadata Database Storage Vault. + ${ExascaleDbStorageVaultId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Grid Setup will be done using this Grid Image OCID. + # Can be obtained using giMinorVersions API + ${GridImageOcid}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The hostname for the Exadata VM cluster on Exascale Infrastructure. + ${Hostname}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + ${NodeCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]] + # CIDR blocks for additional NSG ingress rules. + # The VNET CIDRs used to provision the VM Cluster will be added by default. + # To construct, see NOTES section for NSGCIDR properties and create a hash table. + ${NsgCidr}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + ${PrivateZoneOcid}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCP Single Client Access Name (SCAN) port. + # The default port is 1521. + ${ScanListenerPortTcp}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The TCPS Single Client Access Name (SCAN) port. + # The default port is 2484. + ${ScanListenerPortTcpSsl}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The shape of the Exadata VM cluster on Exascale Infrastructure resource + ${Shape}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + ${SshPublicKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Client subnet + ${SubnetId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Operating system version of the image. + ${SystemVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The time zone of the Exadata VM cluster on Exascale Infrastructure. + # For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + ${TimeZone}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + ${TotalEcpuCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Total Capacity + ${VMFileSystemStorageTotalSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # VNET for network connectivity + ${VnetId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The availability zones. + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a ExascaleDbStorageVault +.Description +Create a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function New-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The size of additional Flash Cache in percentage of High Capacity database storage. + ${AdditionalFlashCacheInPercent}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Exadata Database Storage Vault description. + ${Description}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the Exadata Database Storage Vault. + # The name does not need to be unique. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Total Capacity + ${HighCapacityDatabaseStorageInputTotalSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The time zone that you want to use for the Exadata Database Storage Vault + ${TimeZone}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The availability zones. + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a OracleSubscription +.Description +Create a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanageroraclesubscription +#> +function New-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent] + # Intent for the update operation + ${Intent}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A user defined name of the 3rd Party Artifact that is being procured. + ${PlanName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # 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. + ${PlanProduct}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + ${PlanPromotionCode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The publisher of the 3rd Party Artifact that is being bought. + # E.g. + # NewRelic + ${PlanPublisher}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The version of the desired product/artifact. + ${PlanVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Product code for the term unit + ${ProductCode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Term Unit. + # P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + ${TermUnit}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Create a VirtualNetworkAddress +.Description +Create a VirtualNetworkAddress +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/new-azoracledatabaseresourcemanagervirtualnetworkaddress +#> +function New-AzOracleDatabaseResourceManagerVirtualNetworkAddress { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(Mandatory)] + [Alias('Virtualnetworkaddressname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # Virtual IP address hostname. + ${Name}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Virtual network Address address. + ${IPAddress}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Virtual Machine OCID. + ${VMOcid}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + CreateExpanded = 'Az.OracleDatabaseResourceManager.private\New-AzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a AutonomousDatabaseBackup +.Description +Delete a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerautonomousdatabasebackup +#> +function Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a AutonomousDatabase +.Description +Delete a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Remove-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabase_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a CloudExadataInfrastructure +.Description +Delete a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Remove VMs from the VM Cluster +.Description +Remove VMs from the VM Cluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Add/Remove (Virtual Machine) DbNode model + DbServer : Db servers ocids + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudvmclustervm +#> +function Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='RemoveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Remove')] + [Parameter(ParameterSetName='RemoveExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Remove', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode] + # Add/Remove (Virtual Machine) DbNode model + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Remove = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_Remove'; + RemoveExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded'; + RemoveViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity'; + RemoveViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded'; + } + if (('Remove', 'RemoveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a CloudVmCluster +.Description +Delete a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudvmcluster +#> +function Remove-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMCluster_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Remove VMs from the VM Cluster +.Description +Remove VMs from the VM Cluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + DbNode : The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + DbNodeId : Exascale DbNode Azure Resource ID + +DBNODE : The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + DbNodeId : Exascale DbNode Azure Resource ID + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexadbvmclustervm +#> +function Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='RemoveViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${ExadbVMClusterName}, + + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Remove')] + [Parameter(ParameterSetName='RemoveExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Remove', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails] + # Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. + # Applies to Exadata Database Service on Exascale Infrastructure only. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[]] + # The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + # To construct, see NOTES section for DBNODE properties and create a hash table. + ${DbNode}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Remove = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_Remove'; + RemoveExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded'; + RemoveViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity'; + RemoveViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded'; + } + if (('Remove', 'RemoveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a ExadbVmCluster +.Description +Delete a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexadbvmcluster +#> +function Remove-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMCluster_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a ExascaleDbStorageVault +.Description +Delete a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a OracleSubscription +.Description +Delete a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanageroraclesubscription +#> +function Remove-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerOracleSubscription_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Delete a VirtualNetworkAddress +.Description +Delete a VirtualNetworkAddress +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagervirtualnetworkaddress +#> +function Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Virtualnetworkaddressname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # Virtual IP address hostname. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database +.Description +Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Configurations of a Disaster Recovery Details + [DisasterRecoveryType ]: Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + [IsReplicateAutomaticBackup ]: If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + [IsSnapshotStandby ]: Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database. + [TimeSnapshotStandbyEnabledTill ]: Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/rename-azoracledatabaseresourcemanagerautonomoudatabasedisasterrecoveryconfiguration +#> +function Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='ChangeExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Change', Mandatory)] + [Parameter(ParameterSetName='ChangeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Change', Mandatory)] + [Parameter(ParameterSetName='ChangeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Change')] + [Parameter(ParameterSetName='ChangeExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ChangeViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Change', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ChangeViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails] + # Configurations of a Disaster Recovery Details + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType] + # Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. + # Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. + # Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + ${DisasterRecoveryType}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. + # If false, the backups taken on the Primary are not replicated to the Standby database. + ${IsReplicateAutomaticBackup}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if user wants to convert to a snapshot standby. + # For example, true would set a standby database to snapshot standby database. + # False would set a snapshot standby database back to regular standby database. + ${IsSnapshotStandby}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # Time and date stored as an RFC 3339 formatted timestamp string. + # For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + ${TimeSnapshotStandbyEnabledTill}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Change = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change'; + ChangeExpanded = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded'; + ChangeViaIdentity = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity'; + ChangeViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded'; + } + if (('Change', 'ChangeExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Restores an Autonomous Database based on the provided request parameters. +.Description +Restores an Autonomous Database based on the provided request parameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Details to restore an Oracle Autonomous Database. + Timestamp : The time to restore the database to. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/restore-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Restore-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='RestoreExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Restore')] + [Parameter(ParameterSetName='RestoreExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Restore', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails] + # Details to restore an Oracle Autonomous Database. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # The time to restore the database to. + ${Timestamp}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Restore = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_Restore'; + RestoreExpanded = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded'; + RestoreViaIdentity = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity'; + RestoreViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded'; + } + if (('Restore', 'RestoreExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a AutonomousDatabaseBackup +.Description +Update a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerautonomousdatabasebackup +#> +function Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the backup. + # The name does not have to be unique. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days + ${RetentionPeriodInDay}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a AutonomousDatabase +.Description +Update a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Update-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # Customer Contacts. + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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 + ${LocalAdgAutoFailoverMaxDataLossLimit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if the long-term backup schedule should be deleted. + # The default value is `FALSE`. + ${LongTermBackupScheduleIsDisabled}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType] + # The frequency of the long-term backup schedule + ${LongTermBackupScheduleRepeatCadence}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for backups. + ${LongTermBackupScheduleRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # The timestamp for the long-term backup schedule. + # For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + ${LongTermBackupScheduleTimeOfBackup}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType] + # Indicates the Autonomous Database mode. + ${OpenMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType] + # The Autonomous Database permission level. + ${PermissionLevel}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType] + # The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + ${Role}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStartTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStopTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # 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'] + ${WhitelistedIP}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a CloudExadataInfrastructure +.Description +Update a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : 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. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # 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. + # + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWDAYSOFWEEK properties and create a hash table. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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 + ${MaintenanceWindowHoursOfDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]] + # Months during the year when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWMONTH properties and create a hash table. + ${MaintenanceWindowMonth}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a CloudVmCluster +.Description +Update a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +FILESYSTEMCONFIGURATIONDETAIL : Array of mount path and size. + [FileSystemSizeGb ]: Size of the VM + [MountPoint ]: Mount path + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagercloudvmcluster +#> +function Update-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The list of compute servers to be added to the cloud VM cluster. + ${ComputeNode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]] + # Array of mount path and size. + # To construct, see NOTES section for FILESYSTEMCONFIGURATIONDETAIL properties and create a hash table. + ${FileSystemConfigurationDetail}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The data disk group size to be allocated in GBs per VM. + ${StorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a ExadbVmCluster +.Description +Update a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerexadbvmcluster +#> +function Update-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + ${NodeCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The availability zones. + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a ExascaleDbStorageVault +.Description +Update a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} + +<# +.Synopsis +Update a OracleSubscription +.Description +Update a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanageroraclesubscription +#> +function Update-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent] + # Intent for the update operation + ${Intent}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A user defined name of the 3rd Party Artifact that is being procured. + ${PlanName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # 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. + ${PlanProduct}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + ${PlanPromotionCode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The publisher of the 3rd Party Artifact that is being bought. + # E.g. + # NewRelic + ${PlanPublisher}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The version of the desired product/artifact. + ${PlanVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Product code for the term unit + ${ProductCode}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/README.md b/swaggerci/oracle.DefaultTag/exports/README.md new file mode 100644 index 000000000000..3f2ae982dd07 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/README.md @@ -0,0 +1,20 @@ +# Exports +This directory contains the cmdlets *exported by* `Az.OracleDatabaseResourceManager`. No other cmdlets in this repository are directly exported. What that means is the `Az.OracleDatabaseResourceManager` module will run [Export-ModuleMember](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/export-modulemember) on the cmldets in this directory. The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `../custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The cmdlets generated here are created every time you run `build-module.ps1`. These cmdlets are a merge of all (excluding `InternalExport`) cmdlets from the private binary (`../bin/Az.OracleDatabaseResourceManager.private.dll`) and from the `../custom/Az.OracleDatabaseResourceManager.custom.psm1` module. Cmdlets that are *not merged* from those directories are decorated with the `InternalExport` attribute. This happens when you set the cmdlet to **hide** from configuration. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) or the [README.md](../internal/README.md) in the `../internal` folder. + +## Purpose +We generate script cmdlets out of the binary cmdlets and custom cmdlets. The format of script cmdlets are simplistic; thus, easier to generate at build time. Generating the cmdlets is required as to allow merging of generated binary, hand-written binary, and hand-written custom cmdlets. For Azure cmdlets, having script cmdlets simplifies the mechanism for exporting Azure profiles. + +## Structure +The cmdlets generated here will flat in the directory (no sub-folders) as long as there are no Azure profiles specified for any cmdlets. Azure profiles (the `Profiles` attribute) is only applied when generating with the `--azure` attribute (or `azure: true` in the configuration). When Azure profiles are applied, the folder structure has a folder per profile. Each profile folder has only those cmdlets that apply to that profile. + +## Usage +When `./Az.OracleDatabaseResourceManager.psm1` is loaded, it dynamically exports cmdlets here based on the folder structure and on the selected profile. If there are no sub-folders, it exports all cmdlets at the root of this folder. If there are sub-folders, it checks to see the selected profile. If no profile is selected, it exports the cmdlets in the last sub-folder (alphabetically). If a profile is selected, it exports the cmdlets in the sub-folder that matches the profile name. If there is no sub-folder that matches the profile name, it exports no cmdlets and writes a warning message. \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 new file mode 100644 index 000000000000..a927ea37069f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a AutonomousDatabase +.Description +Delete a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Remove-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabase_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 new file mode 100644 index 000000000000..1fa2d50bb313 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 @@ -0,0 +1,247 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a AutonomousDatabaseBackup +.Description +Delete a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerautonomousdatabasebackup +#> +function Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..684f825b3f05 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a CloudExadataInfrastructure +.Description +Delete a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 new file mode 100644 index 000000000000..d558d7b777cb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a CloudVmCluster +.Description +Delete a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudvmcluster +#> +function Remove-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMCluster_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.ps1 new file mode 100644 index 000000000000..da4cefd80282 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.ps1 @@ -0,0 +1,262 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Remove VMs from the VM Cluster +.Description +Remove VMs from the VM Cluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Add/Remove (Virtual Machine) DbNode model + DbServer : Db servers ocids + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagercloudvmclustervm +#> +function Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='RemoveExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Remove')] + [Parameter(ParameterSetName='RemoveExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Remove', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode] + # Add/Remove (Virtual Machine) DbNode model + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # Db servers ocids + ${DbServer}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Remove = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_Remove'; + RemoveExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded'; + RemoveViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity'; + RemoveViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded'; + } + if (('Remove', 'RemoveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 new file mode 100644 index 000000000000..05924bd02508 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a ExadbVmCluster +.Description +Delete a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexadbvmcluster +#> +function Remove-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMCluster_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.ps1 new file mode 100644 index 000000000000..5415eb70708c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.ps1 @@ -0,0 +1,268 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Remove VMs from the VM Cluster +.Description +Remove VMs from the VM Cluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only. + DbNode : The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + DbNodeId : Exascale DbNode Azure Resource ID + +DBNODE : The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + DbNodeId : Exascale DbNode Azure Resource ID + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexadbvmclustervm +#> +function Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='RemoveViaIdentity', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${ExadbVMClusterName}, + + [Parameter(ParameterSetName='Remove', Mandatory)] + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Remove')] + [Parameter(ParameterSetName='RemoveExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Remove', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RemoveViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails] + # Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. + # Applies to Exadata Database Service on Exascale Infrastructure only. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='RemoveExpanded', Mandatory)] + [Parameter(ParameterSetName='RemoveViaIdentityExpanded', Mandatory)] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[]] + # The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + # To construct, see NOTES section for DBNODE properties and create a hash table. + ${DbNode}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Remove = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_Remove'; + RemoveExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded'; + RemoveViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity'; + RemoveViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded'; + } + if (('Remove', 'RemoveExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 new file mode 100644 index 000000000000..684af3df9b7c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 @@ -0,0 +1,242 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a ExascaleDbStorageVault +.Description +Delete a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerOracleSubscription.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerOracleSubscription.ps1 new file mode 100644 index 000000000000..91b97d1819e6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerOracleSubscription.ps1 @@ -0,0 +1,228 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a OracleSubscription +.Description +Delete a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanageroraclesubscription +#> +function Remove-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerOracleSubscription_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 new file mode 100644 index 000000000000..86817f4fec4d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.ps1 @@ -0,0 +1,248 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Delete a VirtualNetworkAddress +.Description +Delete a VirtualNetworkAddress +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +System.Boolean +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/remove-azoracledatabaseresourcemanagervirtualnetworkaddress +#> +function Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Delete', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Cloudvmclustername}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Alias('Virtualnetworkaddressname')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # Virtual IP address hostname. + ${Name}, + + [Parameter(ParameterSetName='Delete', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Delete')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Returns true when the command succeeds + ${PassThru}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Delete = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete'; + DeleteViaIdentity = 'Az.OracleDatabaseResourceManager.private\Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.ps1 b/swaggerci/oracle.DefaultTag/exports/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.ps1 new file mode 100644 index 000000000000..fd8fa97a83f4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.ps1 @@ -0,0 +1,292 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database +.Description +Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Configurations of a Disaster Recovery Details + [DisasterRecoveryType ]: Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + [IsReplicateAutomaticBackup ]: If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + [IsSnapshotStandby ]: Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database. + [TimeSnapshotStandbyEnabledTill ]: Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/rename-azoracledatabaseresourcemanagerautonomoudatabasedisasterrecoveryconfiguration +#> +function Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='ChangeExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Change', Mandatory)] + [Parameter(ParameterSetName='ChangeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='Change', Mandatory)] + [Parameter(ParameterSetName='ChangeExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Change')] + [Parameter(ParameterSetName='ChangeExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='ChangeViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Change', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='ChangeViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails] + # Configurations of a Disaster Recovery Details + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType] + # Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. + # Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. + # Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + ${DisasterRecoveryType}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. + # If false, the backups taken on the Primary are not replicated to the Standby database. + ${IsReplicateAutomaticBackup}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if user wants to convert to a snapshot standby. + # For example, true would set a standby database to snapshot standby database. + # False would set a snapshot standby database back to regular standby database. + ${IsSnapshotStandby}, + + [Parameter(ParameterSetName='ChangeExpanded')] + [Parameter(ParameterSetName='ChangeViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # Time and date stored as an RFC 3339 formatted timestamp string. + # For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database. + ${TimeSnapshotStandbyEnabledTill}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Change = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change'; + ChangeExpanded = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded'; + ChangeViaIdentity = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity'; + ChangeViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded'; + } + if (('Change', 'ChangeExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 new file mode 100644 index 000000000000..5e30f90a3d8a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 @@ -0,0 +1,262 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Restores an Autonomous Database based on the provided request parameters. +.Description +Restores an Autonomous Database based on the provided request parameters. +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +BODY : Details to restore an Oracle Autonomous Database. + Timestamp : The time to restore the database to. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/restore-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Restore-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='RestoreExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='Restore', Mandatory)] + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='Restore')] + [Parameter(ParameterSetName='RestoreExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(ParameterSetName='Restore', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='RestoreViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails] + # Details to restore an Oracle Autonomous Database. + # To construct, see NOTES section for BODY properties and create a hash table. + ${Body}, + + [Parameter(ParameterSetName='RestoreExpanded', Mandatory)] + [Parameter(ParameterSetName='RestoreViaIdentityExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # The time to restore the database to. + ${Timestamp}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + Restore = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_Restore'; + RestoreExpanded = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded'; + RestoreViaIdentity = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity'; + RestoreViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Restore-AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded'; + } + if (('Restore', 'RestoreExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 new file mode 100644 index 000000000000..9ee16e681e21 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.ps1 @@ -0,0 +1,433 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a AutonomousDatabase +.Description +Update a AutonomousDatabase +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : Customer Contacts. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerautonomousdatabase +#> +function Update-AzOracleDatabaseResourceManagerAutonomousDatabase { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('Autonomousdatabasename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Security.SecureString] + # Admin password. + ${AdminPassword}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType] + # The maintenance schedule type of the Autonomous Database Serverless. + ${AutonomousMaintenanceScheduleType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for long-term backups + ${BackupRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The compute amount (CPUs) available to the database. + ${ComputeCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores to be made available to the database. + ${CpuCoreCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # Customer Contacts. + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The size, in gigabytes, of the data volume that will be created and attached to the database. + ${DataStorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The quantity of data in the database, in terabytes. + ${DataStorageSizeInTb}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType] + # The Oracle Database Edition that applies to the Autonomous databases. + ${DatabaseEdition}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName] + # Name of the day of the week. + ${DayOfWeekName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the Autonomous Database. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + ${IsAutoScalingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if auto scaling is enabled for the Autonomous Database storage. + ${IsAutoScalingForStorageEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + ${IsLocalDataGuardEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Specifies if the Autonomous Database requires mTLS connections. + ${IsMtlsConnectionRequired}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the Oracle Autonomous Database. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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 + ${LocalAdgAutoFailoverMaxDataLossLimit}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates if the long-term backup schedule should be deleted. + # The default value is `FALSE`. + ${LongTermBackupScheduleIsDisabled}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType] + # The frequency of the long-term backup schedule + ${LongTermBackupScheduleRepeatCadence}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days, for backups. + ${LongTermBackupScheduleRetentionPeriodInDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.DateTime] + # The timestamp for the long-term backup schedule. + # For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month. + ${LongTermBackupScheduleTimeOfBackup}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType] + # Indicates the Autonomous Database mode. + ${OpenMode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database. + ${PeerDbId}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType] + # The Autonomous Database permission level. + ${PermissionLevel}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType] + # The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + ${Role}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto start time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStartTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # auto stop time. + # value must be of ISO-8601 format HH:mm + ${ScheduledOperationScheduledStopTime}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # 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'] + ${WhitelistedIP}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 new file mode 100644 index 000000000000..3a90b486250a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.ps1 @@ -0,0 +1,254 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a AutonomousDatabaseBackup +.Description +Update a AutonomousDatabaseBackup +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerautonomousdatabasebackup +#> +function Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # AutonomousDatabaseBackup id + ${Adbbackupid}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The database name. + ${Autonomousdatabasename}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The user-friendly name for the backup. + # The name does not have to be unique. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # Retention period, in days + ${RetentionPeriodInDay}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 new file mode 100644 index 000000000000..83938c7d9460 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.ps1 @@ -0,0 +1,365 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a CloudExadataInfrastructure +.Description +Update a CloudExadataInfrastructure +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +CUSTOMERCONTACT : 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. + Email : The email address used by Oracle to send notifications regarding databases and infrastructure. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. + +MAINTENANCEWINDOWDAYSOFWEEK : Days during the week when maintenance should be performed. + Name : Name of the day of the week. + +MAINTENANCEWINDOWMONTH : Months during the year when maintenance should be performed. + Name : Name of the month of the year. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagercloudexadatainfrastructure +#> +function Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('Cloudexadatainfrastructurename')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudExadataInfrastructure name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of compute servers for the cloud Exadata infrastructure. + ${ComputeCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]] + # 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. + # + # To construct, see NOTES section for CUSTOMERCONTACT properties and create a hash table. + ${CustomerContact}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The name for the Exadata infrastructure. + ${DisplayName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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). + ${MaintenanceWindowCustomActionTimeoutInMin}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]] + # Days during the week when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWDAYSOFWEEK properties and create a hash table. + ${MaintenanceWindowDaysOfWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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 + ${MaintenanceWindowHoursOfDay}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + ${MaintenanceWindowIsCustomActionTimeoutEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # is Monthly Patching Enabled + ${MaintenanceWindowIsMonthlyPatchingEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # 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. + ${MaintenanceWindowLeadTimeInWeek}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]] + # Months during the year when maintenance should be performed. + # To construct, see NOTES section for MAINTENANCEWINDOWMONTH properties and create a hash table. + ${MaintenanceWindowMonth}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode] + # Cloud Exadata infrastructure node patching method. + ${MaintenanceWindowPatchingMode}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference] + # The maintenance window scheduling preference. + ${MaintenanceWindowPreference}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32[]] + # 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. + ${MaintenanceWindowWeeksOfMonth}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of storage servers for the cloud Exadata infrastructure. + ${StorageCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # CloudExadataInfrastructure zones + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 new file mode 100644 index 000000000000..07885ecbfa22 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerCloudVMCluster.ps1 @@ -0,0 +1,338 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a CloudVmCluster +.Description +Update a CloudVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +FILESYSTEMCONFIGURATIONDETAIL : Array of mount path and size. + [FileSystemSizeGb ]: Size of the VM + [MountPoint ]: Mount path + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagercloudvmcluster +#> +function Update-AzOracleDatabaseResourceManagerCloudVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('Cloudvmclustername')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # CloudVmCluster name + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The list of compute servers to be added to the cloud VM cluster. + ${ComputeNode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of CPU cores enabled on the cloud VM cluster. + ${CpuCoreCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + ${DataCollectionOptionIsDiagnosticsEventsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsHealthMonitoringEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Management.Automation.SwitchParameter] + # Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + ${DataCollectionOptionIsIncidentLogsEnabled}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Double] + # The data disk group size to be allocated in TBs. + ${DataStorageSizeInTb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The local node storage to be allocated in GBs. + ${DbNodeStorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Display Name + ${DisplayName}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]] + # Array of mount path and size. + # To construct, see NOTES section for FILESYSTEMCONFIGURATIONDETAIL properties and create a hash table. + ${FileSystemConfigurationDetail}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel] + # The Oracle license model that applies to the cloud VM cluster. + # The default is LICENSE_INCLUDED. + ${LicenseModel}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The memory to be allocated in GBs. + ${MemorySizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Single] + # The number of OCPU cores to enable on the cloud VM cluster. + # Only 1 decimal place is allowed for the fractional part. + ${OcpuCount}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + ${SshPublicKey}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The data disk group size to be allocated in GBs per VM. + ${StorageSizeInGb}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 new file mode 100644 index 000000000000..ee8746fe93ca --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerExadbVMCluster.ps1 @@ -0,0 +1,256 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a ExadbVmCluster +.Description +Update a ExadbVmCluster +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerexadbvmcluster +#> +function Update-AzOracleDatabaseResourceManagerExadbVMCluster { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ExadbVMClusterName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExadbVmCluster + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.Int32] + # The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + ${NodeCount}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String[]] + # The availability zones. + ${Zone}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 new file mode 100644 index 000000000000..0184c7579e33 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.ps1 @@ -0,0 +1,243 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a ExascaleDbStorageVault +.Description +Update a ExascaleDbStorageVault +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanagerexascaledbstoragevault +#> +function Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Alias('ExascaleDbStorageVaultName')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the ExascaleDbStorageVault + ${Name}, + + [Parameter(ParameterSetName='UpdateExpanded', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerOracleSubscription.ps1 b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerOracleSubscription.ps1 new file mode 100644 index 000000000000..088f95fab456 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/exports/Update-AzOracleDatabaseResourceManagerOracleSubscription.ps1 @@ -0,0 +1,270 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +Update a OracleSubscription +.Description +Update a OracleSubscription +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription +.Notes +COMPLEX PARAMETER PROPERTIES + +To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. + +INPUTOBJECT : Identity Parameter + [Adbbackupid ]: AutonomousDatabaseBackup id + [Adbscharsetname ]: AutonomousDatabaseCharacterSet name + [Adbsncharsetname ]: AutonomousDatabaseNationalCharacterSets name + [Autonomousdatabasename ]: The database name. + [Autonomousdbversionsname ]: AutonomousDbVersion name + [Cloudexadatainfrastructurename ]: CloudExadataInfrastructure name + [Cloudvmclustername ]: CloudVmCluster name + [Dbnodeocid ]: DbNode OCID. + [Dbserverocid ]: DbServer OCID. + [Dbsystemshapename ]: DbSystemShape name + [Dnsprivateviewocid ]: DnsPrivateView OCID + [Dnsprivatezonename ]: DnsPrivateZone name + [ExadbVMClusterName ]: The name of the ExadbVmCluster + [ExascaleDbNodeName ]: The name of the ExascaleDbNode + [ExascaleDbStorageVaultName ]: The name of the ExascaleDbStorageVault + [FlexComponentName ]: The name of the FlexComponent + [GiMinorVersionName ]: The name of the GiMinorVersion + [Giversionname ]: GiVersion name + [Id ]: Resource identity path + [Location ]: The name of the Azure region. + [ResourceGroupName ]: The name of the resource group. The name is case insensitive. + [SubscriptionId ]: The ID of the target subscription. The value must be an UUID. + [Systemversionname ]: SystemVersion name + [Virtualnetworkaddressname ]: Virtual IP address hostname. +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/update-azoracledatabaseresourcemanageroraclesubscription +#> +function Update-AzOracleDatabaseResourceManagerOracleSubscription { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription])] +[CmdletBinding(DefaultParameterSetName='UpdateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='UpdateExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String] + # The ID of the target subscription. + # The value must be an UUID. + ${SubscriptionId}, + + [Parameter(ParameterSetName='UpdateViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent])] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent] + # Intent for the update operation + ${Intent}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A user defined name of the 3rd Party Artifact that is being procured. + ${PlanName}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # 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. + ${PlanProduct}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + ${PlanPromotionCode}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The publisher of the 3rd Party Artifact that is being bought. + # E.g. + # NewRelic + ${PlanPublisher}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # The version of the desired product/artifact. + ${PlanVersion}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Body')] + [System.String] + # Product code for the term unit + ${ProductCode}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command as a job + ${AsJob}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Run the command asynchronously + ${NoWait}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() + } + $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + if ($preTelemetryId -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) + } else { + $internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + if ($internalCalledCmdlets -eq '') { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name + } else { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' + } + + $mapping = @{ + UpdateExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded'; + UpdateViaIdentityExpanded = 'Az.OracleDatabaseResourceManager.private\Update-AzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded'; + } + if (('UpdateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $testPlayback = $false + $PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object { if ($_) { $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) } } + if ($testPlayback) { + $PSBoundParameters['SubscriptionId'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1') + } else { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){ + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) + } + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } + + finally { + $backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId + $backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + +} +end { + try { + $steppablePipeline.End() + + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets + if ($preTelemetryId -eq '') { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + } + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId + + } catch { + [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/generate-help.ps1 b/swaggerci/oracle.DefaultTag/generate-help.ps1 new file mode 100644 index 000000000000..660affa39153 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generate-help.ps1 @@ -0,0 +1,66 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$exportsFolder = Join-Path $PSScriptRoot 'exports' +if(-not (Test-Path $exportsFolder)) { + Write-Error "Exports folder '$exportsFolder' was not found." +} + +$directories = Get-ChildItem -Directory -Path $exportsFolder +$hasProfiles = ($directories | Measure-Object).Count -gt 0 +if(-not $hasProfiles) { + $directories = Get-Item -Path $exportsFolder +} + +$docsFolder = Join-Path $PSScriptRoot 'docs' +if(Test-Path $docsFolder) { + $null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue +} +$null = New-Item -ItemType Directory -Force -Path $docsFolder -ErrorAction SilentlyContinue +$examplesFolder = Join-Path $PSScriptRoot 'examples' + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.OracleDatabaseResourceManager.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot './bin/Az.OracleDatabaseResourceManager.private.dll') +$instance = [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName + +foreach($directory in $directories) +{ + if($hasProfiles) { + Select-AzProfile -Name $directory.Name + } + # Reload module per profile + Import-Module -Name $modulePath -Force + + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $directory.FullName + $cmdletHelpInfo = $cmdletNames | ForEach-Object { Get-Help -Name $_ -Full } + $cmdletFunctionInfo = Get-ScriptCmdlet -ScriptFolder $directory.FullName -AsFunctionInfo + + $docsPath = Join-Path $docsFolder $directory.Name + $null = New-Item -ItemType Directory -Force -Path $docsPath -ErrorAction SilentlyContinue + $examplesPath = Join-Path $examplesFolder $directory.Name + $addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true') + Export-HelpMarkdown -ModuleInfo $moduleInfo -FunctionInfo $cmdletFunctionInfo -HelpInfo $cmdletHelpInfo -DocsFolder $docsPath -ExamplesFolder $examplesPath -AddComplexInterfaceInfo:$addComplexInterfaceInfo + Write-Host -ForegroundColor Green "Created documentation in '$docsPath'" +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generate-portal-ux.ps1 b/swaggerci/oracle.DefaultTag/generate-portal-ux.ps1 new file mode 100644 index 000000000000..e981949cc116 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generate-portal-ux.ps1 @@ -0,0 +1,376 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# +# This Script will create a folder dedicated to Azure-specific content and includes metadata files essential for enhancing the user experience (UX) within the Azure portal. +# These files are utilized by the Azure portal to effectively present the usage of cmdlets related to specific resources on portal pages. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated) +$ErrorActionPreference = 'Stop' + +$pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$moduleName = 'Az.OracleDatabaseResourceManager' +$rootModuleName = '' +if ($rootModuleName -eq "") +{ + $rootModuleName = $moduleName +} +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot "./$moduleName.psd1") +$modulePath = $modulePsd1.FullName + +# Load DLL to use build-time cmdlets +Import-Module -Name $modulePath +Import-Module -Name (Join-Path $PSScriptRoot "./bin/$moduleName.private.dll") +$instance = [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module]::Instance +# Module info is shared per profile +$moduleInfo = Get-Module -Name $moduleName +$parameterSetsInfo = Get-Module -Name "$moduleName.private" + +$buildinFunctions = @("Export-CmdletSurface", "Export-ExampleStub", "Export-FormatPs1xml", "Export-HelpMarkdown", "Export-ModelSurface", "Export-ProxyCmdlet", "Export-Psd1", "Export-TestStub", "Get-CommonParameter", "Get-ModuleGuid", "Get-ScriptCmdlet") + +function Test-FunctionSupported() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + If ($buildinfunctions.Contains($FunctionName)) { + return $false + } + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + If ($parameterSetName.Contains("List") -or $parameterSetName.Contains("ViaIdentity")) { + return $false + } + If ($cmdletName.StartsWith("New") -or $cmdletName.StartsWith("Set") -or $cmdletName.StartsWith("Update")) { + return $false + } + + $parameterSetInfo = $parameterSetsInfo.ExportedCmdlets[$FunctionName] + foreach ($parameterInfo in $parameterSetInfo.Parameters.Values) + { + $category = (Get-ParameterAttribute -ParameterInfo $parameterInfo -AttributeName "CategoryAttribute").Categories + $invalideCategory = @('Query', 'Body') + if ($invalideCategory -contains $category) + { + return $false + } + } + + $customFiles = Get-ChildItem -Path custom -Filter "$cmdletName.*" + if ($customFiles.Length -ne 0) + { + return $false + } + + return $true +} + +function Get-MappedCmdletFromFunctionName() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [string] + $FunctionName + ) + + $cmdletName, $parameterSetName = $FunctionName.Split("_") + + return $cmdletName +} + +function Get-ParameterAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo, + [Parameter()] + [String] + $AttributeName + ) + return $ParameterInfo.Attributes | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletAttribute() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $CmdletInfo, + [Parameter()] + [String] + $AttributeName + ) + + return $CmdletInfo.ImplementingType.GetTypeInfo().GetCustomAttributes([System.object], $true) | Where-Object { $_.TypeId.Name -eq $AttributeName } +} + +function Get-CmdletDescription() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [String] + $CmdletName + ) + $helpInfo = Get-Help $CmdletName -Full + + $description = $helpInfo.Description.Text + if ($null -eq $description) + { + return "" + } + return $description +} + +# Test whether the parameter is from swagger http path +function Test-ParameterFromSwagger() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.ParameterMetadata] + $ParameterInfo + ) + $category = (Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "CategoryAttribute").Categories + $doNotExport = Get-ParameterAttribute -ParameterInfo $ParameterInfo -AttributeName "DoNotExportAttribute" + if ($null -ne $doNotExport) + { + return $false + } + + $valideCategory = @('Path') + if ($valideCategory -contains $category) + { + return $true + } + return $false +} + +function New-ExampleForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $category = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "CategoryAttribute").Categories + $sourceName = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "InfoAttribute").SerializedName + $name = $parameter.Name + $result += [ordered]@{ + name = "-$Name" + value = "[$category.$sourceName]" + } + } + + return $result +} + +function New-ParameterArrayInParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $parameters = $ParameterSetInfo.Parameters.Values | Where-Object { Test-ParameterFromSwagger $_ } + $result = @() + foreach ($parameter in $parameters) + { + $isMandatory = (Get-ParameterAttribute -parameterInfo $parameter -AttributeName "ParameterAttribute").Mandatory + $parameterName = $parameter.Name + $parameterType = $parameter.ParameterType.ToString().Split('.')[1] + if ($parameter.SwitchParameter) + { + $parameterSignature = "-$parameterName" + } + else + { + $parameterSignature = "-$parameterName <$parameterType>" + } + if ($parameterName -eq "SubscriptionId") + { + $isMandatory = $false + } + if (-not $isMandatory) + { + $parameterSignature = "[$parameterSignature]" + } + $result += $parameterSignature + } + + return $result +} + +function New-MetadataForParameterSet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Management.Automation.CommandInfo] + $ParameterSetInfo + ) + $httpAttribute = Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "HttpPathAttribute" + $httpPath = $httpAttribute.Path + $apiVersion = $httpAttribute.ApiVersion + $provider = [System.Text.RegularExpressions.Regex]::New("/providers/([\w+\.]+)/").Match($httpPath).Groups[1].Value + $resourcePath = "/" + $httpPath.Split("$provider/")[1] + $resourceType = [System.Text.RegularExpressions.Regex]::New("/([\w]+)/\{\w+\}").Matches($resourcePath) | ForEach-Object {$_.groups[1].Value} | Join-String -Separator "/" + $cmdletName = Get-MappedCmdletFromFunctionName $ParameterSetInfo.Name + $description = (Get-CmdletAttribute -CmdletInfo $ParameterSetInfo -AttributeName "DescriptionAttribute").Description + [object[]]$example = New-ExampleForParameterSet $ParameterSetInfo + if ($Null -eq $example) + { + $example = @() + } + + [string[]]$signature = New-ParameterArrayInParameterSet $ParameterSetInfo + if ($Null -eq $signature) + { + $signature = @() + } + + return @{ + Path = $httpPath + Provider = $provider + ResourceType = $resourceType + ApiVersion = $apiVersion + CmdletName = $cmdletName + Description = $description + Example = $example + Signature = @{ + parameters = $signature + } + } +} + +function Merge-WithExistCmdletMetadata() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [System.Collections.Specialized.OrderedDictionary] + $ExistedCmdletInfo, + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $ExistedCmdletInfo.help.parameterSets += $ParameterSetMetadata.Signature + $ExistedCmdletInfo.examples += [ordered]@{ + description = $ParameterSetMetadata.Description + parameters = $ParameterSetMetadata.Example + } + + return $ExistedCmdletInfo +} + +function New-MetadataForCmdlet() +{ + [CmdletBinding()] + Param ( + [Parameter()] + [Hashtable] + $ParameterSetMetadata + ) + $cmdletName = $ParameterSetMetadata.CmdletName + $description = Get-CmdletDescription $cmdletName + $result = [ordered]@{ + name = $cmdletName + description = $description + path = $ParameterSetMetadata.Path + help = [ordered]@{ + learnMore = [ordered]@{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName/$cmdletName".ToLower() + } + parameterSets = @() + } + examples = @() + } + $result = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $result -ParameterSetMetadata $ParameterSetMetadata + return $result +} + +$parameterSets = $parameterSetsInfo.ExportedCmdlets.Keys | Where-Object { Test-functionSupported($_) } +$resourceTypes = @{} +foreach ($parameterSetName in $parameterSets) +{ + $cmdletInfo = $parameterSetsInfo.ExportedCommands[$parameterSetName] + $parameterSetMetadata = New-MetadataForParameterSet -ParameterSetInfo $cmdletInfo + $cmdletName = $parameterSetMetadata.CmdletName + if (-not ($moduleInfo.ExportedCommands.ContainsKey($cmdletName))) + { + continue + } + if ($resourceTypes.ContainsKey($parameterSetMetadata.ResourceType)) + { + $ExistedCmdletInfo = $resourceTypes[$parameterSetMetadata.ResourceType].commands | Where-Object { $_.name -eq $cmdletName } + if ($ExistedCmdletInfo) + { + $ExistedCmdletInfo = Merge-WithExistCmdletMetadata -ExistedCmdletInfo $ExistedCmdletInfo -ParameterSetMetadata $parameterSetMetadata + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType].commands += $cmdletInfo + } + } + else + { + $cmdletInfo = New-MetadataForCmdlet -ParameterSetMetadata $parameterSetMetadata + $resourceTypes[$parameterSetMetadata.ResourceType] = [ordered]@{ + resourceType = $parameterSetMetadata.ResourceType + apiVersion = $parameterSetMetadata.ApiVersion + learnMore = @{ + url = "https://learn.microsoft.com/powershell/module/$rootModuleName".ToLower() + } + commands = @($cmdletInfo) + provider = $parameterSetMetadata.Provider + } + } +} + +$UXFolder = 'UX' +if (Test-Path $UXFolder) +{ + Remove-Item -Path $UXFolder -Recurse +} +$null = New-Item -ItemType Directory -Path $UXFolder + +foreach ($resourceType in $resourceTypes.Keys) +{ + $resourceTypeFileName = $resourceType -replace "/", "-" + if ($resourceTypeFileName -eq "") + { + continue + } + $resourceTypeInfo = $resourceTypes[$resourceType] + $provider = $resourceTypeInfo.provider + $providerFolder = "$UXFolder/$provider" + if (-not (Test-Path $providerFolder)) + { + $null = New-Item -ItemType Directory -Path $providerFolder + } + $resourceTypeInfo.Remove("provider") + $resourceTypeInfo | ConvertTo-Json -Depth 10 | Out-File "$providerFolder/$resourceTypeFileName.json" +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/Module.cs b/swaggerci/oracle.DefaultTag/generated/Module.cs new file mode 100644 index 000000000000..e701730e9f99 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/Module.cs @@ -0,0 +1,189 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using SendAsyncStepDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using PipelineChangeDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>; + using GetParameterDelegate = global::System.Func; + using ModuleLoadPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using ArgumentCompleterDelegate = global::System.Func; + using GetTelemetryIdDelegate = global::System.Func; + using TelemetryDelegate = global::System.Action; + using NewRequestPipelineDelegate = global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>, global::System.Action, global::System.Threading.Tasks.Task>, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>>>; + using SignalDelegate = global::System.Func, global::System.Threading.Tasks.Task>; + using EventListenerDelegate = global::System.Func, global::System.Func, global::System.Threading.Tasks.Task>, global::System.Management.Automation.InvocationInfo, string, string, string, global::System.Exception, global::System.Threading.Tasks.Task>; + using NextDelegate = global::System.Func, global::System.Threading.Tasks.Task>, global::System.Threading.Tasks.Task>; + using SanitizerDelegate = global::System.Action; + using GetTelemetryInfoDelegate = global::System.Func>; + + /// A class that contains the module-common code and data. + public partial class Module + { + /// The currently selected profile. + public string Profile = global::System.String.Empty; + + public global::System.Net.Http.HttpClientHandler _handler = new global::System.Net.Http.HttpClientHandler(); + + /// the ISendAsync pipeline instance + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline _pipeline; + + /// the ISendAsync pipeline instance (when proxy is enabled) + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline _pipelineWithProxy; + + public bool _useProxy = false; + + public global::System.Net.WebProxy _webProxy = new global::System.Net.WebProxy(); + + /// Gets completion data for azure specific fields + public ArgumentCompleterDelegate ArgumentCompleter { get; set; } + + /// The instance of the Client API + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager ClientAPI { get; set; } + + /// A delegate that gets called for each signalled event + public EventListenerDelegate EventListener { get; set; } + + /// The delegate to call to get parameter data from a common module. + public GetParameterDelegate GetParameterValue { get; set; } + + /// The delegate to get the telemetry Id. + public GetTelemetryIdDelegate GetTelemetryId { get; set; } + + /// The delegate to get the telemetry info. + public GetTelemetryInfoDelegate GetTelemetryInfo { get; set; } + + /// Backing field for property. + private static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module _instance; + + /// the singleton of this module class + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module Instance => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module._instance?? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module._instance = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module()); + + /// The Name of this module + public string Name => @"Az.OracleDatabaseResourceManager"; + + /// The delegate to call when this module is loaded (supporting a commmon module). + public ModuleLoadPipelineDelegate OnModuleLoad { get; set; } + + /// The delegate to call before each new request (supporting a commmon module). + public NewRequestPipelineDelegate OnNewRequest { get; set; } + + /// The name of the currently selected Azure profile + public global::System.String ProfileName { get; set; } + + /// The ResourceID for this module (azure arm). + public string ResourceId => @"Az.OracleDatabaseResourceManager"; + + /// The delegate to call in WriteObject to sanitize the output object. + public SanitizerDelegate SanitizeOutput { get; set; } + + /// The delegate for creating a telemetry. + public TelemetryDelegate Telemetry { get; set; } + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void AfterCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline pipeline); + + /// The from the cmdlet + /// The HttpPipeline for the request + + partial void BeforeCreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline pipeline); + + partial void CustomInit(); + + /// Creates an instance of the HttpPipeline for each call. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the cmdlet's parameterset name. + /// a dict for extensible parameters + /// An instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline for the remote call. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline CreatePipeline(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string processRecordId, string parameterSetName = null, global::System.Collections.Generic.IDictionary extensibleParameters = null) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline pipeline = null; + BeforeCreatePipeline(invocationInfo, ref pipeline); + pipeline = (pipeline ?? (_useProxy ? _pipelineWithProxy : _pipeline)).Clone(); + AfterCreatePipeline(invocationInfo, ref pipeline); + pipeline.Append(new Runtime.CmdInfoHandler(processRecordId, invocationInfo, parameterSetName).SendAsync); + OnNewRequest?.Invoke( invocationInfo, correlationId,processRecordId, (step)=> { pipeline.Prepend(step); } , (step)=> { pipeline.Append(step); } ); + return pipeline; + } + + /// Gets parameters from a common module. + /// The from the cmdlet + /// the cmdlet's correlation id. + /// The name of the parameter to get the value for. + /// + /// The parameter value from the common module. (Note: this should be type converted on the way back) + /// + public object GetParameter(global::System.Management.Automation.InvocationInfo invocationInfo, string correlationId, string parameterName) => GetParameterValue?.Invoke( ResourceId, Name, invocationInfo, correlationId,parameterName ); + + /// Initialization steps performed after the module is loaded. + public void Init() + { + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipeline.Prepend(step); } , (step)=> { _pipeline.Append(step); } ); + OnModuleLoad?.Invoke( ResourceId, Name ,(step)=> { _pipelineWithProxy.Prepend(step); } , (step)=> { _pipelineWithProxy.Append(step); } ); + CustomInit(); + } + + /// Creates the module instance. + private Module() + { + // constructor + ClientAPI = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager(); + _handler.Proxy = _webProxy; + _pipeline = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient())); + _pipelineWithProxy = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpClientFactory(new global::System.Net.Http.HttpClient(_handler))); + } + + /// The HTTP Proxy to use. + /// The HTTP Proxy Credentials + /// True if the proxy should use default credentials + public void SetProxyConfiguration(global::System.Uri proxy, global::System.Management.Automation.PSCredential proxyCredential, bool proxyUseDefaultCredentials) + { + _useProxy = proxy != null; + if (proxy == null) + { + return; + } + // set the proxy configuration + _webProxy.Address = proxy; + _webProxy.BypassProxyOnLocal = false; + if (proxyUseDefaultCredentials) + { + _webProxy.Credentials = null; + _webProxy.UseDefaultCredentials = true; + } + else + { + _webProxy.UseDefaultCredentials = false; + _webProxy.Credentials = proxyCredential ?.GetNetworkCredential(); + } + } + + /// Called to dispatch events to the common module listener + /// The ID of the event + /// The cancellation token for the event + /// A delegate to get the detailed event data + /// The callback for the event dispatcher + /// The from the cmdlet + /// the cmdlet's parameterset name. + /// the cmdlet's correlation id. + /// the cmdlet's process record correlation id. + /// the exception that is being thrown (if available) + /// + /// A that will be complete when handling of the event is completed. + /// + public async global::System.Threading.Tasks.Task Signal(string id, global::System.Threading.CancellationToken token, global::System.Func getEventData, SignalDelegate signal, global::System.Management.Automation.InvocationInfo invocationInfo, string parameterSetName, string correlationId, string processRecordId, global::System.Exception exception) + { + using( NoSynchronizationContext ) + { + await EventListener?.Invoke(id,token,getEventData, signal, invocationInfo, parameterSetName, correlationId,processRecordId,exception); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Any.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.PowerShell.cs new file mode 100644 index 000000000000..dd000c4e3014 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.PowerShell.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial class Any + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Any(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Any(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Any(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Any(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Any object + [System.ComponentModel.TypeConverter(typeof(AnyTypeConverter))] + public partial interface IAny + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Any.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.TypeConverter.cs new file mode 100644 index 000000000000..140e0058391e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AnyTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Any.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Any.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Any.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Any.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.cs new file mode 100644 index 000000000000..4fc6b2166b69 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Any object + public partial class Any : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAnyInternal + { + + /// Creates an new instance. + public Any() + { + + } + } + /// Any object + public partial interface IAny : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + + } + /// Any object + internal partial interface IAnyInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Any.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.json.cs new file mode 100644 index 000000000000..38149e2648f3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Any.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Any object + public partial class Any + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal Any(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new Any(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.PowerShell.cs new file mode 100644 index 000000000000..6f2f3275d080 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Activation Links model + [System.ComponentModel.TypeConverter(typeof(ActivationLinksTypeConverter))] + public partial class ActivationLinks + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ActivationLinks(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NewCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).NewCloudAccountActivationLink = (string) content.GetValueForProperty("NewCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).NewCloudAccountActivationLink, global::System.Convert.ToString); + } + if (content.Contains("ExistingCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).ExistingCloudAccountActivationLink = (string) content.GetValueForProperty("ExistingCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).ExistingCloudAccountActivationLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ActivationLinks(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NewCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).NewCloudAccountActivationLink = (string) content.GetValueForProperty("NewCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).NewCloudAccountActivationLink, global::System.Convert.ToString); + } + if (content.Contains("ExistingCloudAccountActivationLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).ExistingCloudAccountActivationLink = (string) content.GetValueForProperty("ExistingCloudAccountActivationLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal)this).ExistingCloudAccountActivationLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ActivationLinks(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ActivationLinks(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Activation Links model + [System.ComponentModel.TypeConverter(typeof(ActivationLinksTypeConverter))] + public partial interface IActivationLinks + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.TypeConverter.cs new file mode 100644 index 000000000000..23effda0afc2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ActivationLinksTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ActivationLinks.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ActivationLinks.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ActivationLinks.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.cs new file mode 100644 index 000000000000..309a41ada8e8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Activation Links model + public partial class ActivationLinks : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal + { + + /// Backing field for property. + private string _existingCloudAccountActivationLink; + + /// Existing Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ExistingCloudAccountActivationLink { get => this._existingCloudAccountActivationLink; } + + /// Internal Acessors for ExistingCloudAccountActivationLink + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal.ExistingCloudAccountActivationLink { get => this._existingCloudAccountActivationLink; set { {_existingCloudAccountActivationLink = value;} } } + + /// Internal Acessors for NewCloudAccountActivationLink + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinksInternal.NewCloudAccountActivationLink { get => this._newCloudAccountActivationLink; set { {_newCloudAccountActivationLink = value;} } } + + /// Backing field for property. + private string _newCloudAccountActivationLink; + + /// New Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NewCloudAccountActivationLink { get => this._newCloudAccountActivationLink; } + + /// Creates an new instance. + public ActivationLinks() + { + + } + } + /// Activation Links model + public partial interface IActivationLinks : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Existing Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Existing Cloud Account Activation Link", + SerializedName = @"existingCloudAccountActivationLink", + PossibleTypes = new [] { typeof(string) })] + string ExistingCloudAccountActivationLink { get; } + /// New Cloud Account Activation Link + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"New Cloud Account Activation Link", + SerializedName = @"newCloudAccountActivationLink", + PossibleTypes = new [] { typeof(string) })] + string NewCloudAccountActivationLink { get; } + + } + /// Activation Links model + internal partial interface IActivationLinksInternal + + { + /// Existing Cloud Account Activation Link + string ExistingCloudAccountActivationLink { get; set; } + /// New Cloud Account Activation Link + string NewCloudAccountActivationLink { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.json.cs new file mode 100644 index 000000000000..b3cdd02d3d40 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ActivationLinks.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Activation Links model + public partial class ActivationLinks + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ActivationLinks(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_newCloudAccountActivationLink = If( json?.PropertyT("newCloudAccountActivationLink"), out var __jsonNewCloudAccountActivationLink) ? (string)__jsonNewCloudAccountActivationLink : (string)NewCloudAccountActivationLink;} + {_existingCloudAccountActivationLink = If( json?.PropertyT("existingCloudAccountActivationLink"), out var __jsonExistingCloudAccountActivationLink) ? (string)__jsonExistingCloudAccountActivationLink : (string)ExistingCloudAccountActivationLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ActivationLinks(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._newCloudAccountActivationLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._newCloudAccountActivationLink.ToString()) : null, "newCloudAccountActivationLink" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._existingCloudAccountActivationLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._existingCloudAccountActivationLink.ToString()) : null, "existingCloudAccountActivationLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.PowerShell.cs new file mode 100644 index 000000000000..16db3c95c25f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Add/Remove (Virtual Machine) DbNode model + [System.ComponentModel.TypeConverter(typeof(AddRemoveDbNodeTypeConverter))] + public partial class AddRemoveDbNode + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AddRemoveDbNode(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNodeInternal)this).DbServer = (string[]) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNodeInternal)this).DbServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AddRemoveDbNode(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNodeInternal)this).DbServer = (string[]) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNodeInternal)this).DbServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AddRemoveDbNode(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AddRemoveDbNode(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Add/Remove (Virtual Machine) DbNode model + [System.ComponentModel.TypeConverter(typeof(AddRemoveDbNodeTypeConverter))] + public partial interface IAddRemoveDbNode + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.TypeConverter.cs new file mode 100644 index 000000000000..b3effed39a91 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AddRemoveDbNodeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AddRemoveDbNode.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AddRemoveDbNode.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AddRemoveDbNode.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.cs new file mode 100644 index 000000000000..1bf6c0efbd56 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Add/Remove (Virtual Machine) DbNode model + public partial class AddRemoveDbNode : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNodeInternal + { + + /// Backing field for property. + private string[] _dbServer; + + /// Db servers ocids + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] DbServer { get => this._dbServer; set => this._dbServer = value; } + + /// Creates an new instance. + public AddRemoveDbNode() + { + + } + } + /// Add/Remove (Virtual Machine) DbNode model + public partial interface IAddRemoveDbNode : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Db servers ocids + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + string[] DbServer { get; set; } + + } + /// Add/Remove (Virtual Machine) DbNode model + internal partial interface IAddRemoveDbNodeInternal + + { + /// Db servers ocids + string[] DbServer { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.json.cs new file mode 100644 index 000000000000..1e65aa8b7f22 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AddRemoveDbNode.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Add/Remove (Virtual Machine) DbNode model + public partial class AddRemoveDbNode + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AddRemoveDbNode(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbServer = If( json?.PropertyT("dbServers"), out var __jsonDbServers) ? If( __jsonDbServers as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : DbServer;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AddRemoveDbNode(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._dbServer) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._dbServer ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("dbServers",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.PowerShell.cs new file mode 100644 index 000000000000..45f4201c1933 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [System.ComponentModel.TypeConverter(typeof(AllConnectionStringTypeTypeConverter))] + public partial class AllConnectionStringType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AllConnectionStringType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AllConnectionStringType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AllConnectionStringType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AllConnectionStringType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + [System.ComponentModel.TypeConverter(typeof(AllConnectionStringTypeTypeConverter))] + public partial interface IAllConnectionStringType + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.TypeConverter.cs new file mode 100644 index 000000000000..56d4a340fb35 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AllConnectionStringTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AllConnectionStringType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AllConnectionStringType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AllConnectionStringType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.cs new file mode 100644 index 000000000000..3a215a655e5e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class AllConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal + { + + /// Backing field for property. + private string _high; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string High { get => this._high; set => this._high = value; } + + /// Backing field for property. + private string _low; + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Low { get => this._low; set => this._low = value; } + + /// Backing field for property. + private string _medium; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Medium { get => this._medium; set => this._medium = value; } + + /// Creates an new instance. + public AllConnectionStringType() + { + + } + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + public partial interface IAllConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string Low { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string Medium { get; set; } + + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + internal partial interface IAllConnectionStringTypeInternal + + { + /// + /// 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. + /// + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string Low { get; set; } + /// + /// 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. + /// + string Medium { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.json.cs new file mode 100644 index 000000000000..c073c01d6af4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AllConnectionStringType.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class AllConnectionStringType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AllConnectionStringType(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_high = If( json?.PropertyT("high"), out var __jsonHigh) ? (string)__jsonHigh : (string)High;} + {_low = If( json?.PropertyT("low"), out var __jsonLow) ? (string)__jsonLow : (string)Low;} + {_medium = If( json?.PropertyT("medium"), out var __jsonMedium) ? (string)__jsonMedium : (string)Medium;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AllConnectionStringType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._high)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._high.ToString()) : null, "high" ,container.Add ); + AddIf( null != (((object)this._low)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._low.ToString()) : null, "low" ,container.Add ); + AddIf( null != (((object)this._medium)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._medium.ToString()) : null, "medium" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.PowerShell.cs new file mode 100644 index 000000000000..75702566db5f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Information about Oracle APEX Application Development. + [System.ComponentModel.TypeConverter(typeof(ApexDetailsTypeTypeConverter))] + public partial class ApexDetailsType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ApexDetailsType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).ApexVersion = (string) content.GetValueForProperty("ApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).ApexVersion, global::System.Convert.ToString); + } + if (content.Contains("OrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).OrdsVersion = (string) content.GetValueForProperty("OrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).OrdsVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ApexDetailsType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).ApexVersion = (string) content.GetValueForProperty("ApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).ApexVersion, global::System.Convert.ToString); + } + if (content.Contains("OrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).OrdsVersion = (string) content.GetValueForProperty("OrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)this).OrdsVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ApexDetailsType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ApexDetailsType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Information about Oracle APEX Application Development. + [System.ComponentModel.TypeConverter(typeof(ApexDetailsTypeTypeConverter))] + public partial interface IApexDetailsType + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.TypeConverter.cs new file mode 100644 index 000000000000..1bbb840636b9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ApexDetailsTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ApexDetailsType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ApexDetailsType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ApexDetailsType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.cs new file mode 100644 index 000000000000..a5c7d87fd8c5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Information about Oracle APEX Application Development. + public partial class ApexDetailsType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal + { + + /// Backing field for property. + private string _apexVersion; + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ApexVersion { get => this._apexVersion; set => this._apexVersion = value; } + + /// Backing field for property. + private string _ordsVersion; + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OrdsVersion { get => this._ordsVersion; set => this._ordsVersion = value; } + + /// Creates an new instance. + public ApexDetailsType() + { + + } + } + /// Information about Oracle APEX Application Development. + public partial interface IApexDetailsType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle APEX Application Development version.", + SerializedName = @"apexVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle REST Data Services (ORDS) version.", + SerializedName = @"ordsVersion", + PossibleTypes = new [] { typeof(string) })] + string OrdsVersion { get; set; } + + } + /// Information about Oracle APEX Application Development. + internal partial interface IApexDetailsTypeInternal + + { + /// The Oracle APEX Application Development version. + string ApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + string OrdsVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.json.cs new file mode 100644 index 000000000000..f2c18203fa91 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ApexDetailsType.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Information about Oracle APEX Application Development. + public partial class ApexDetailsType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ApexDetailsType(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_apexVersion = If( json?.PropertyT("apexVersion"), out var __jsonApexVersion) ? (string)__jsonApexVersion : (string)ApexVersion;} + {_ordsVersion = If( json?.PropertyT("ordsVersion"), out var __jsonOrdsVersion) ? (string)__jsonOrdsVersion : (string)OrdsVersion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ApexDetailsType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._apexVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._apexVersion.ToString()) : null, "apexVersion" ,container.Add ); + AddIf( null != (((object)this._ordsVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ordsVersion.ToString()) : null, "ordsVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.PowerShell.cs new file mode 100644 index 000000000000..3cdc890c34b4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.PowerShell.cs @@ -0,0 +1,1154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseTypeConverter))] + public partial class AutonomousDatabase + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabase(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBasePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PropertiesPeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PropertiesPeerDbId = (string) content.GetValueForProperty("PropertiesPeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PropertiesPeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabase(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBasePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PropertiesPeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PropertiesPeerDbId = (string) content.GetValueForProperty("PropertiesPeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PropertiesPeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabase(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabase(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseTypeConverter))] + public partial interface IAutonomousDatabase + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.TypeConverter.cs new file mode 100644 index 000000000000..dcd09ec6b6de --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabase.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabase.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabase.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.cs new file mode 100644 index 000000000000..e471dbc216ce --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.cs @@ -0,0 +1,2080 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabase : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AdminPassword = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllocatedStorageSizeInTb; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AutonomousMaintenanceScheduleType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AvailableUpgradeVersion; } + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).CharacterSet = value ?? null; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ComputeModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel)""); } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringDedicated = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType? DataBaseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataBaseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataBaseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType)""); } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DatabaseEdition = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DbWorkload = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType)""); } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).FailedDataRecoveryInSecond; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsRemoteDataGuardEnabled; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleState; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalDisasterRecoveryType; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbLifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState)""); } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionString = value; } + + /// Internal Acessors for ConnectionStringAllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionStringAllConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LocalStandbyDb = value; } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).LongTermBackupSchedule = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbId = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpoint = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisionableCpu + int[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for RemoteDisasterRecoveryConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfiguration = value; } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperation = value; } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationDayOfWeek = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeDisasterRecoveryRoleChanged + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDisasterRecoveryRoleChanged = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInTb = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OpenMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).OperationsInsightsStatus; } + + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbId; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PermissionLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PrivateEndpointLabel = value ?? null; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PropertiesPeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbId1; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).PeerDbId1 = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties()); set => this._property = value; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ProvisioningState; } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = value ?? default(bool); } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationIsSnapshotStandby; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = value ?? default(bool); } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).Role = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).ServiceConsoleUrl; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).SupportedRegionsToCloneTo; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeDisasterRecoveryRoleChanged; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).TimeReclamationOfFreeAutonomousDatabase; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).VnetId = value ?? null; } + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)Property).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabase() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// Autonomous Database resource model. + public partial interface IAutonomousDatabase : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current amount of storage in use for user and system data, in terabytes (TB).", + SerializedName = @"actualUsedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? ActualUsedDataStorageSizeInTb { get; } + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringLow { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringMedium { get; set; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of storage currently allocated for the database tables and billed for, rounded up.", + SerializedName = @"allocatedStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AllocatedStorageSizeInTb { get; } + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle APEX Application Development version.", + SerializedName = @"apexVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle REST Data Services (ORDS) version.", + SerializedName = @"ordsVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailOrdsVersion { get; set; } + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Autonomous Database ID", + SerializedName = @"autonomousDatabaseId", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.", + SerializedName = @"availableUpgradeVersions", + PossibleTypes = new [] { typeof(string) })] + string[] AvailableUpgradeVersion { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the autonomous database.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute model of the Autonomous Database.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"dedicated", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringDedicated { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringLow { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringMedium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata.", + SerializedName = @"profiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get; set; } + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle Application Express (APEX) URL.", + SerializedName = @"apexUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Database Transforms for the Autonomous Database.", + SerializedName = @"databaseTransformsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlDatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Graph Studio for the Autonomous Database.", + SerializedName = @"graphStudioUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlGraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database.", + SerializedName = @"machineLearningNotebookUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the MongoDB API for the Autonomous Database.", + SerializedName = @"mongoDbUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database.", + SerializedName = @"ordsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlOrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle SQL Developer Web URL.", + SerializedName = @"sqlDevWebUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlSqlDevWebUrl { get; set; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database type to be created.", + SerializedName = @"dataBaseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType? DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of the Data Safe registration for this Autonomous Database.", + SerializedName = @"dataSafeStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; set; } + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates the number of seconds of data loss for a Data Guard failover.", + SerializedName = @"failedDataRecoveryInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? FailedDataRecoveryInSecond { get; } + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The area assigned to In-Memory tables in Autonomous Database.", + SerializedName = @"inMemoryAreaInGbs", + PossibleTypes = new [] { typeof(int) })] + int? InMemoryAreaInGb { get; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates if the Autonomous Database version is a preview version.", + SerializedName = @"isPreview", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreview { get; } + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database preview version is being provisioned.", + SerializedName = @"isPreviewVersionWithServiceTermsAccepted", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the Autonomous Database has Cross Region Data Guard enabled.", + SerializedName = @"isRemoteDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRemoteDataGuardEnabled { get; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"localDisasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"lagTimeInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? LocalStandbyDbLagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbLifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of the Autonomous Database.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of memory (in GBs) enabled per ECPU or OCPU.", + SerializedName = @"memoryPerOracleComputeUnitInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemoryPerOracleComputeUnitInGb { get; } + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the Autonomous Database.", + SerializedName = @"ncharacterSet", + PossibleTypes = new [] { typeof(string) })] + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when the next long-term backup would be created.", + SerializedName = @"nextLongTermBackupTimeStamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NextLongTermBackupTimeStamp { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Database ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of Operations Insights for this Autonomous Database.", + SerializedName = @"operationsInsightsStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get; } + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs.", + SerializedName = @"peerDbIds", + PossibleTypes = new [] { typeof(string) })] + string[] PeerDbId { get; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The private endpoint for the resource.", + SerializedName = @"privateEndpoint", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpoint { get; } + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The private endpoint Ip address for the resource.", + SerializedName = @"privateEndpointIp", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource's private endpoint label.", + SerializedName = @"privateEndpointLabel", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointLabel { get; set; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PropertiesPeerDbId { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An array of CPU values that an Autonomous Database can be scaled to.", + SerializedName = @"provisionableCpus", + PossibleTypes = new [] { typeof(int) })] + int[] ProvisionableCpu { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"disasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get; set; } + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + SerializedName = @"isReplicateAutomaticBackups", + PossibleTypes = new [] { typeof(bool) })] + bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get; set; } + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.", + SerializedName = @"isSnapshotStandby", + PossibleTypes = new [] { typeof(bool) })] + bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get; set; } + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.", + SerializedName = @"timeSnapshotStandbyEnabledTill", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URL of the Service Console for the Autonomous Database.", + SerializedName = @"serviceConsoleUrl", + PossibleTypes = new [] { typeof(string) })] + string ServiceConsoleUrl { get; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The SQL Web Developer URL for the Oracle Autonomous Database.", + SerializedName = @"sqlWebDeveloperUrl", + PossibleTypes = new [] { typeof(string) })] + string SqlWebDeveloperUrl { get; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.", + SerializedName = @"supportedRegionsToCloneTo", + PossibleTypes = new [] { typeof(string) })] + string[] SupportedRegionsToCloneTo { get; } + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time that the database was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Autonomous Data Guard role was switched for the Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDataGuardRoleChanged { get; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Always Free database will be automatically deleted because of inactivity.", + SerializedName = @"timeDeletionOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeDeletionOfFreeAutonomousDatabase { get; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeDisasterRecoveryRoleChanged { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"timeLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(string) })] + string TimeLocalDataGuardEnabled { get; } + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when maintenance will begin.", + SerializedName = @"timeMaintenanceBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceBegin { get; } + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when maintenance will end.", + SerializedName = @"timeMaintenanceEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceEnd { get; } + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The timestamp of the last failover operation.", + SerializedName = @"timeOfLastFailover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastFailover { get; } + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when last refresh happened.", + SerializedName = @"timeOfLastRefresh", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefresh { get; } + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The refresh point timestamp (UTC).", + SerializedName = @"timeOfLastRefreshPoint", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefreshPoint { get; } + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The timestamp of the last switchover operation for the Autonomous Database.", + SerializedName = @"timeOfLastSwitchover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastSwitchover { get; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Always Free database will be stopped because of inactivity.", + SerializedName = @"timeReclamationOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeReclamationOfFreeAutonomousDatabase { get; } + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The storage space consumed by Autonomous Database in GBs.", + SerializedName = @"usedDataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInGb { get; } + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of storage that has been used, in terabytes.", + SerializedName = @"usedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInTb { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + string[] WhitelistedIP { get; set; } + + } + /// Autonomous Database resource model. + internal partial interface IAutonomousDatabaseInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + double? ActualUsedDataStorageSizeInTb { get; set; } + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// + /// 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. + /// + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string AllConnectionStringLow { get; set; } + /// + /// 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. + /// + string AllConnectionStringMedium { get; set; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + double? AllocatedStorageSizeInTb { get; set; } + /// Information about Oracle APEX Application Development. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ApexDetail { get; set; } + /// The Oracle APEX Application Development version. + string ApexDetailApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + string ApexDetailOrdsVersion { get; set; } + /// Autonomous Database ID + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + string[] AvailableUpgradeVersion { get; set; } + + string AzureAsyncOperation { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The connection string used to connect to the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConnectionString { get; set; } + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType ConnectionStringAllConnectionString { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + string ConnectionStringDedicated { get; set; } + /// + /// 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. + /// + string ConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string ConnectionStringLow { get; set; } + /// + /// 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. + /// + string ConnectionStringMedium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConnectionUrl { get; set; } + /// Oracle Application Express (APEX) URL. + string ConnectionUrlApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + string ConnectionUrlDatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + string ConnectionUrlGraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + string ConnectionUrlMachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + string ConnectionUrlMongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + string ConnectionUrlOrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + string ConnectionUrlSqlDevWebUrl { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// Database type to be created. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType? DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The Autonomous Database workload type + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + int? FailedDataRecoveryInSecond { get; set; } + /// The area assigned to In-Memory tables in Autonomous Database. + int? InMemoryAreaInGb { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + bool? IsPreview { get; set; } + /// Specifies if the Autonomous Database preview version is being provisioned. + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + bool? IsRemoteDataGuardEnabled { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// Views lifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get; set; } + /// + /// 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 + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get; set; } + /// Local Autonomous Disaster Recovery standby database details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary LocalStandbyDb { get; set; } + /// + /// 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. + /// + int? LocalStandbyDbLagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + string LocalStandbyDbLifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + int? MemoryPerOracleComputeUnitInGb { get; set; } + /// The character set for the Autonomous Database. + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + global::System.DateTime? NextLongTermBackupTimeStamp { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Database ocid + string Ocid { get; set; } + /// Indicates the Autonomous Database mode. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get; set; } + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + string[] PeerDbId { get; set; } + /// The Autonomous Database permission level. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// The private endpoint for the resource. + string PrivateEndpoint { get; set; } + /// The private endpoint Ip address for the resource. + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + string PrivateEndpointLabel { get; set; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + string PropertiesPeerDbId { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties Property { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + int[] ProvisionableCpu { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// Indicates remote disaster recovery configuration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get; set; } + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get; set; } + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get; set; } + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get; set; } + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get; set; } + + int? RetryAfter { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + string ServiceConsoleUrl { get; set; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + string SqlWebDeveloperUrl { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + string[] SupportedRegionsToCloneTo { get; set; } + /// The date and time that the database was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + string TimeDeletionOfFreeAutonomousDatabase { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + global::System.DateTime? TimeDisasterRecoveryRoleChanged { get; set; } + /// + /// 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. + /// + string TimeLocalDataGuardEnabled { get; set; } + /// The date and time when maintenance will begin. + global::System.DateTime? TimeMaintenanceBegin { get; set; } + /// The date and time when maintenance will end. + global::System.DateTime? TimeMaintenanceEnd { get; set; } + /// The timestamp of the last failover operation. + string TimeOfLastFailover { get; set; } + /// The date and time when last refresh happened. + string TimeOfLastRefresh { get; set; } + /// The refresh point timestamp (UTC). + string TimeOfLastRefreshPoint { get; set; } + /// The timestamp of the last switchover operation for the Autonomous Database. + string TimeOfLastSwitchover { get; set; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + string TimeReclamationOfFreeAutonomousDatabase { get; set; } + /// The storage space consumed by Autonomous Database in GBs. + int? UsedDataStorageSizeInGb { get; set; } + /// The amount of storage that has been used, in terabytes. + int? UsedDataStorageSizeInTb { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// + /// 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'] + /// + string[] WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.json.cs new file mode 100644 index 000000000000..2b192a8cce39 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabase.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabase + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabase(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabase(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.PowerShell.cs new file mode 100644 index 000000000000..d221f6d8ac03 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.PowerShell.cs @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDatabaseBackup resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupTypeConverter))] + public partial class AutonomousDatabaseBackup + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackup(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState.CreateFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).BackupType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType?) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).BackupType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackup(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState.CreateFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).BackupType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType?) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).BackupType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackup(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackup(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDatabaseBackup resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupTypeConverter))] + public partial interface IAutonomousDatabaseBackup + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.TypeConverter.cs new file mode 100644 index 000000000000..6fd519fa5c6a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackup.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackup.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackup.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.cs new file mode 100644 index 000000000000..84825e2254d8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.cs @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource definition + public partial class AutonomousDatabaseBackup : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AutonomousDatabaseOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid; } + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType; } + + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? DatabaseSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb; } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion; } + + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsAutomatic { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic; } + + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsRestorable { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail; } + + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState; } + + /// Internal Acessors for AutonomousDatabaseOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.AutonomousDatabaseOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid = value; } + + /// Internal Acessors for BackupType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.BackupType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType = value; } + + /// Internal Acessors for DatabaseSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.DatabaseSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb = value; } + + /// Internal Acessors for DbVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion = value; } + + /// Internal Acessors for IsAutomatic + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.IsAutomatic { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic = value; } + + /// Internal Acessors for IsRestorable + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.IsRestorable { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.SizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb = value; } + + /// Internal Acessors for TimeAvailableTil + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.TimeAvailableTil { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil = value; } + + /// Internal Acessors for TimeEnded + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.TimeEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded = value; } + + /// Internal Acessors for TimeStarted + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal.TimeStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState; } + + /// Retention period, in days + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? RetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).RetentionPeriodInDay = value ?? default(int); } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? SizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeAvailableTil { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil; } + + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded; } + + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AutonomousDatabaseBackup() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// AutonomousDatabaseBackup resource definition + public partial interface IAutonomousDatabaseBackup : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Autonomous Database.", + SerializedName = @"autonomousDatabaseOcid", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseOcid { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of backup.", + SerializedName = @"backupType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get; } + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The size of the database in terabytes at the time the backup was taken.", + SerializedName = @"databaseSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DatabaseSizeInTb { get; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; } + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the backup is user-initiated or automatic.", + SerializedName = @"isAutomatic", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutomatic { get; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the backup can be used to restore the associated Autonomous Database.", + SerializedName = @"isRestorable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRestorable { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current state of the backup.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get; } + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Autonomous Database backup.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// Retention period, in days + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The backup size in terabytes (TB).", + SerializedName = @"sizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? SizeInTb { get; } + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Timestamp until when the backup will be available.", + SerializedName = @"timeAvailableTil", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAvailableTil { get; } + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the backup completed.", + SerializedName = @"timeEnded", + PossibleTypes = new [] { typeof(string) })] + string TimeEnded { get; } + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the backup started.", + SerializedName = @"timeStarted", + PossibleTypes = new [] { typeof(string) })] + string TimeStarted { get; } + + } + /// AutonomousDatabaseBackup resource definition + internal partial interface IAutonomousDatabaseBackupInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The OCID of the Autonomous Database. + string AutonomousDatabaseOcid { get; set; } + + string AzureAsyncOperation { get; set; } + /// The type of backup. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get; set; } + /// The size of the database in terabytes at the time the backup was taken. + double? DatabaseSizeInTb { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The user-friendly name for the backup. The name does not have to be unique. + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + bool? IsAutomatic { get; set; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + bool? IsRestorable { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// The current state of the backup. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get; set; } + /// The OCID of the Autonomous Database backup. + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties Property { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// Retention period, in days + int? RetentionPeriodInDay { get; set; } + + int? RetryAfter { get; set; } + /// The backup size in terabytes (TB). + double? SizeInTb { get; set; } + /// Timestamp until when the backup will be available. + global::System.DateTime? TimeAvailableTil { get; set; } + /// The date and time the backup completed. + string TimeEnded { get; set; } + /// The date and time the backup started. + string TimeStarted { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.json.cs new file mode 100644 index 000000000000..81134639e4b1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackup.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource definition + public partial class AutonomousDatabaseBackup + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackup(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackup(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.PowerShell.cs new file mode 100644 index 000000000000..ba5ef59cac66 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a AutonomousDatabaseBackup list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupListResultTypeConverter))] + public partial class AutonomousDatabaseBackupListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a AutonomousDatabaseBackup list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupListResultTypeConverter))] + public partial interface IAutonomousDatabaseBackupListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.TypeConverter.cs new file mode 100644 index 000000000000..6eef3205e88b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.cs new file mode 100644 index 000000000000..6f8260859480 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabaseBackup list operation. + public partial class AutonomousDatabaseBackupListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup[] _value; + + /// The AutonomousDatabaseBackup items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AutonomousDatabaseBackupListResult() + { + + } + } + /// The response of a AutonomousDatabaseBackup list operation. + public partial interface IAutonomousDatabaseBackupListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabaseBackup items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AutonomousDatabaseBackup items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup[] Value { get; set; } + + } + /// The response of a AutonomousDatabaseBackup list operation. + internal partial interface IAutonomousDatabaseBackupListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabaseBackup items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.json.cs new file mode 100644 index 000000000000..c12b6af7d8a6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupListResult.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabaseBackup list operation. + public partial class AutonomousDatabaseBackupListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackup.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.PowerShell.cs new file mode 100644 index 000000000000..aa5588b41684 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.PowerShell.cs @@ -0,0 +1,268 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDatabaseBackup resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupPropertiesTypeConverter))] + public partial class AutonomousDatabaseBackupProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState.CreateFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType?) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState.CreateFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType?) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).BackupType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDatabaseBackup resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseBackupProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.TypeConverter.cs new file mode 100644 index 000000000000..91539ab22a56 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.cs new file mode 100644 index 000000000000..ce32e9be443e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource model + public partial class AutonomousDatabaseBackupProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal + { + + /// Backing field for property. + private string _autonomousDatabaseOcid; + + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AutonomousDatabaseOcid { get => this._autonomousDatabaseOcid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? _backupType; + + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get => this._backupType; } + + /// Backing field for property. + private double? _databaseSizeInTb; + + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? DatabaseSizeInTb { get => this._databaseSizeInTb; } + + /// Backing field for property. + private string _dbVersion; + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DbVersion { get => this._dbVersion; } + + /// Backing field for property. + private string _displayName; + + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private bool? _isAutomatic; + + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsAutomatic { get => this._isAutomatic; } + + /// Backing field for property. + private bool? _isRestorable; + + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsRestorable { get => this._isRestorable; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? _lifecycleState; + + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get => this._lifecycleState; } + + /// Internal Acessors for AutonomousDatabaseOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.AutonomousDatabaseOcid { get => this._autonomousDatabaseOcid; set { {_autonomousDatabaseOcid = value;} } } + + /// Internal Acessors for BackupType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.BackupType { get => this._backupType; set { {_backupType = value;} } } + + /// Internal Acessors for DatabaseSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.DatabaseSizeInTb { get => this._databaseSizeInTb; set { {_databaseSizeInTb = value;} } } + + /// Internal Acessors for DbVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.DbVersion { get => this._dbVersion; set { {_dbVersion = value;} } } + + /// Internal Acessors for IsAutomatic + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.IsAutomatic { get => this._isAutomatic; set { {_isAutomatic = value;} } } + + /// Internal Acessors for IsRestorable + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.IsRestorable { get => this._isRestorable; set { {_isRestorable = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.SizeInTb { get => this._sizeInTb; set { {_sizeInTb = value;} } } + + /// Internal Acessors for TimeAvailableTil + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.TimeAvailableTil { get => this._timeAvailableTil; set { {_timeAvailableTil = value;} } } + + /// Internal Acessors for TimeEnded + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.TimeEnded { get => this._timeEnded; set { {_timeEnded = value;} } } + + /// Internal Acessors for TimeStarted + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal.TimeStarted { get => this._timeStarted; set { {_timeStarted = value;} } } + + /// Backing field for property. + private string _ocid; + + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private int? _retentionPeriodInDay; + + /// Retention period, in days + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetentionPeriodInDay { get => this._retentionPeriodInDay; set => this._retentionPeriodInDay = value; } + + /// Backing field for property. + private double? _sizeInTb; + + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? SizeInTb { get => this._sizeInTb; } + + /// Backing field for property. + private global::System.DateTime? _timeAvailableTil; + + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeAvailableTil { get => this._timeAvailableTil; } + + /// Backing field for property. + private string _timeEnded; + + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeEnded { get => this._timeEnded; } + + /// Backing field for property. + private string _timeStarted; + + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeStarted { get => this._timeStarted; } + + /// Creates an new instance. + public AutonomousDatabaseBackupProperties() + { + + } + } + /// AutonomousDatabaseBackup resource model + public partial interface IAutonomousDatabaseBackupProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Autonomous Database.", + SerializedName = @"autonomousDatabaseOcid", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseOcid { get; } + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of backup.", + SerializedName = @"backupType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get; } + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The size of the database in terabytes at the time the backup was taken.", + SerializedName = @"databaseSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DatabaseSizeInTb { get; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; } + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the backup is user-initiated or automatic.", + SerializedName = @"isAutomatic", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutomatic { get; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the backup can be used to restore the associated Autonomous Database.", + SerializedName = @"isRestorable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRestorable { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current state of the backup.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get; } + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Autonomous Database backup.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// Retention period, in days + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The backup size in terabytes (TB).", + SerializedName = @"sizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? SizeInTb { get; } + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Timestamp until when the backup will be available.", + SerializedName = @"timeAvailableTil", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAvailableTil { get; } + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the backup completed.", + SerializedName = @"timeEnded", + PossibleTypes = new [] { typeof(string) })] + string TimeEnded { get; } + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the backup started.", + SerializedName = @"timeStarted", + PossibleTypes = new [] { typeof(string) })] + string TimeStarted { get; } + + } + /// AutonomousDatabaseBackup resource model + internal partial interface IAutonomousDatabaseBackupPropertiesInternal + + { + /// The OCID of the Autonomous Database. + string AutonomousDatabaseOcid { get; set; } + /// The type of backup. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get; set; } + /// The size of the database in terabytes at the time the backup was taken. + double? DatabaseSizeInTb { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The user-friendly name for the backup. The name does not have to be unique. + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + bool? IsAutomatic { get; set; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + bool? IsRestorable { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// The current state of the backup. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get; set; } + /// The OCID of the Autonomous Database backup. + string Ocid { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// Retention period, in days + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + double? SizeInTb { get; set; } + /// Timestamp until when the backup will be available. + global::System.DateTime? TimeAvailableTil { get; set; } + /// The date and time the backup completed. + string TimeEnded { get; set; } + /// The date and time the backup started. + string TimeStarted { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.json.cs new file mode 100644 index 000000000000..d8b13105da25 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupProperties.json.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource model + public partial class AutonomousDatabaseBackupProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_autonomousDatabaseOcid = If( json?.PropertyT("autonomousDatabaseOcid"), out var __jsonAutonomousDatabaseOcid) ? (string)__jsonAutonomousDatabaseOcid : (string)AutonomousDatabaseOcid;} + {_databaseSizeInTb = If( json?.PropertyT("databaseSizeInTbs"), out var __jsonDatabaseSizeInTbs) ? (double?)__jsonDatabaseSizeInTbs : DatabaseSizeInTb;} + {_dbVersion = If( json?.PropertyT("dbVersion"), out var __jsonDbVersion) ? (string)__jsonDbVersion : (string)DbVersion;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_isAutomatic = If( json?.PropertyT("isAutomatic"), out var __jsonIsAutomatic) ? (bool?)__jsonIsAutomatic : IsAutomatic;} + {_isRestorable = If( json?.PropertyT("isRestorable"), out var __jsonIsRestorable) ? (bool?)__jsonIsRestorable : IsRestorable;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_retentionPeriodInDay = If( json?.PropertyT("retentionPeriodInDays"), out var __jsonRetentionPeriodInDays) ? (int?)__jsonRetentionPeriodInDays : RetentionPeriodInDay;} + {_sizeInTb = If( json?.PropertyT("sizeInTbs"), out var __jsonSizeInTbs) ? (double?)__jsonSizeInTbs : SizeInTb;} + {_timeAvailableTil = If( json?.PropertyT("timeAvailableTil"), out var __jsonTimeAvailableTil) ? global::System.DateTime.TryParse((string)__jsonTimeAvailableTil, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeAvailableTilValue) ? __jsonTimeAvailableTilValue : TimeAvailableTil : TimeAvailableTil;} + {_timeStarted = If( json?.PropertyT("timeStarted"), out var __jsonTimeStarted) ? (string)__jsonTimeStarted : (string)TimeStarted;} + {_timeEnded = If( json?.PropertyT("timeEnded"), out var __jsonTimeEnded) ? (string)__jsonTimeEnded : (string)TimeEnded;} + {_backupType = If( json?.PropertyT("backupType"), out var __jsonBackupType) ? (string)__jsonBackupType : (string)BackupType;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._autonomousDatabaseOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._autonomousDatabaseOcid.ToString()) : null, "autonomousDatabaseOcid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._databaseSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._databaseSizeInTb) : null, "databaseSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._dbVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbVersion.ToString()) : null, "dbVersion" ,container.Add ); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isAutomatic ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isAutomatic) : null, "isAutomatic" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isRestorable ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isRestorable) : null, "isRestorable" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + AddIf( null != this._retentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._retentionPeriodInDay) : null, "retentionPeriodInDays" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._sizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._sizeInTb) : null, "sizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeAvailableTil ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeAvailableTil?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeAvailableTil" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeStarted)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeStarted.ToString()) : null, "timeStarted" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeEnded)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeEnded.ToString()) : null, "timeEnded" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._backupType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._backupType.ToString()) : null, "backupType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.PowerShell.cs new file mode 100644 index 000000000000..27bb10e247d5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.PowerShell.cs @@ -0,0 +1,354 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDatabaseBackup resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupUpdateTypeConverter))] + public partial class AutonomousDatabaseBackupUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState.CreateFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).BackupType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType?) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).BackupType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AutonomousDatabaseOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).AutonomousDatabaseOcid = (string) content.GetValueForProperty("AutonomousDatabaseOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).AutonomousDatabaseOcid, global::System.Convert.ToString); + } + if (content.Contains("DatabaseSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DatabaseSizeInTb = (double?) content.GetValueForProperty("DatabaseSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DatabaseSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutomatic")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsAutomatic = (bool?) content.GetValueForProperty("IsAutomatic",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsAutomatic, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRestorable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsRestorable = (bool?) content.GetValueForProperty("IsRestorable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).IsRestorable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState.CreateFrom); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).SizeInTb = (double?) content.GetValueForProperty("SizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).SizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("TimeAvailableTil")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeAvailableTil = (global::System.DateTime?) content.GetValueForProperty("TimeAvailableTil",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeAvailableTil, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeStarted = (string) content.GetValueForProperty("TimeStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeStarted, global::System.Convert.ToString); + } + if (content.Contains("TimeEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeEnded = (string) content.GetValueForProperty("TimeEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).TimeEnded, global::System.Convert.ToString); + } + if (content.Contains("BackupType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).BackupType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType?) content.GetValueForProperty("BackupType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).BackupType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType.CreateFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDatabaseBackup resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupUpdateTypeConverter))] + public partial interface IAutonomousDatabaseBackupUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.TypeConverter.cs new file mode 100644 index 000000000000..372609422d4e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.cs new file mode 100644 index 000000000000..139aa0a5ab49 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.cs @@ -0,0 +1,395 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource definition + public partial class AutonomousDatabaseBackupUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AutonomousDatabaseOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid; } + + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType; } + + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? DatabaseSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb; } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion; } + + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsAutomatic { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic; } + + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsRestorable { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail; } + + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState; } + + /// Internal Acessors for AutonomousDatabaseOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.AutonomousDatabaseOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).AutonomousDatabaseOcid = value; } + + /// Internal Acessors for BackupType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.BackupType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).BackupType = value; } + + /// Internal Acessors for DatabaseSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.DatabaseSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DatabaseSizeInTb = value; } + + /// Internal Acessors for DbVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).DbVersion = value; } + + /// Internal Acessors for IsAutomatic + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.IsAutomatic { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsAutomatic = value; } + + /// Internal Acessors for IsRestorable + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.IsRestorable { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).IsRestorable = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.SizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb = value; } + + /// Internal Acessors for TimeAvailableTil + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.TimeAvailableTil { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil = value; } + + /// Internal Acessors for TimeEnded + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.TimeEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded = value; } + + /// Internal Acessors for TimeStarted + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdateInternal.TimeStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).ProvisioningState; } + + /// Retention period, in days + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? RetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).RetentionPeriodInDay = value ?? default(int); } + + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? SizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).SizeInTb; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeAvailableTil { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeAvailableTil; } + + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeEnded; } + + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupPropertiesInternal)Property).TimeStarted; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AutonomousDatabaseBackupUpdate() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// AutonomousDatabaseBackup resource definition + public partial interface IAutonomousDatabaseBackupUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The OCID of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Autonomous Database.", + SerializedName = @"autonomousDatabaseOcid", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseOcid { get; } + /// The type of backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of backup.", + SerializedName = @"backupType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get; } + /// The size of the database in terabytes at the time the backup was taken. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The size of the database in terabytes at the time the backup was taken.", + SerializedName = @"databaseSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DatabaseSizeInTb { get; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; } + /// The user-friendly name for the backup. The name does not have to be unique. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the backup is user-initiated or automatic.", + SerializedName = @"isAutomatic", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutomatic { get; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the backup can be used to restore the associated Autonomous Database.", + SerializedName = @"isRestorable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRestorable { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// The current state of the backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current state of the backup.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get; } + /// The OCID of the Autonomous Database backup. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Autonomous Database backup.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// Retention period, in days + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The backup size in terabytes (TB).", + SerializedName = @"sizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? SizeInTb { get; } + /// Timestamp until when the backup will be available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Timestamp until when the backup will be available.", + SerializedName = @"timeAvailableTil", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAvailableTil { get; } + /// The date and time the backup completed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the backup completed.", + SerializedName = @"timeEnded", + PossibleTypes = new [] { typeof(string) })] + string TimeEnded { get; } + /// The date and time the backup started. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the backup started.", + SerializedName = @"timeStarted", + PossibleTypes = new [] { typeof(string) })] + string TimeStarted { get; } + + } + /// AutonomousDatabaseBackup resource definition + internal partial interface IAutonomousDatabaseBackupUpdateInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The OCID of the Autonomous Database. + string AutonomousDatabaseOcid { get; set; } + /// The type of backup. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType? BackupType { get; set; } + /// The size of the database in terabytes at the time the backup was taken. + double? DatabaseSizeInTb { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The user-friendly name for the backup. The name does not have to be unique. + string DisplayName { get; set; } + /// Indicates whether the backup is user-initiated or automatic. + bool? IsAutomatic { get; set; } + /// + /// Indicates whether the backup can be used to restore the associated Autonomous Database. + /// + bool? IsRestorable { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// The current state of the backup. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState? LifecycleState { get; set; } + /// The OCID of the Autonomous Database backup. + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupProperties Property { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// Retention period, in days + int? RetentionPeriodInDay { get; set; } + /// The backup size in terabytes (TB). + double? SizeInTb { get; set; } + /// Timestamp until when the backup will be available. + global::System.DateTime? TimeAvailableTil { get; set; } + /// The date and time the backup completed. + string TimeEnded { get; set; } + /// The date and time the backup started. + string TimeStarted { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.json.cs new file mode 100644 index 000000000000..2f64e91cf321 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBackupUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseBackup resource definition + public partial class AutonomousDatabaseBackupUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.PowerShell.cs new file mode 100644 index 000000000000..75b0ab521950 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.PowerShell.cs @@ -0,0 +1,1034 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database base resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBasePropertiesTypeConverter))] + public partial class AutonomousDatabaseBaseProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBaseProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBaseProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBaseProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBaseProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database base resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBasePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseBaseProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.TypeConverter.cs new file mode 100644 index 000000000000..ddda20a16040 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBasePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBaseProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBaseProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBaseProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.cs new file mode 100644 index 000000000000..cdfb0cb9463b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.cs @@ -0,0 +1,2203 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database base resource model. + public partial class AutonomousDatabaseBaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal + { + + /// Backing field for property. + private double? _actualUsedDataStorageSizeInTb; + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? ActualUsedDataStorageSizeInTb { get => this._actualUsedDataStorageSizeInTb; } + + /// Backing field for property. + private System.Security.SecureString _adminPassword; + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public System.Security.SecureString AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionStringMedium = value ?? null; } + + /// Backing field for property. + private double? _allocatedStorageSizeInTb; + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? AllocatedStorageSizeInTb { get => this._allocatedStorageSizeInTb; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType _apexDetail; + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ApexDetail { get => (this._apexDetail = this._apexDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsType()); } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)ApexDetail).ApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)ApexDetail).ApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)ApexDetail).OrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsTypeInternal)ApexDetail).OrdsVersion = value ?? null; } + + /// Backing field for property. + private string _autonomousDatabaseId; + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AutonomousDatabaseId { get => this._autonomousDatabaseId; set => this._autonomousDatabaseId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? _autonomousMaintenanceScheduleType; + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => this._autonomousMaintenanceScheduleType; set => this._autonomousMaintenanceScheduleType = value; } + + /// Backing field for property. + private string[] _availableUpgradeVersion; + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] AvailableUpgradeVersion { get => this._availableUpgradeVersion; } + + /// Backing field for property. + private int? _backupRetentionPeriodInDay; + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? BackupRetentionPeriodInDay { get => this._backupRetentionPeriodInDay; set => this._backupRetentionPeriodInDay = value; } + + /// Backing field for property. + private string _characterSet; + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CharacterSet { get => this._characterSet; set => this._characterSet = value; } + + /// Backing field for property. + private float? _computeCount; + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public float? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? _computeModel; + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => this._computeModel; set => this._computeModel = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType _connectionString; + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConnectionString { get => (this._connectionString = this._connectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringType()); } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Dedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Dedicated = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).High; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).High = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Low; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Low = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Medium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Medium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Profile; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).Profile = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType _connectionUrl; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConnectionUrl { get => (this._connectionUrl = this._connectionUrl ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlType()); } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).ApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).ApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).DatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).DatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).GraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).GraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).MachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).MachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).MongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).MongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).OrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).OrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).SqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)ConnectionUrl).SqlDevWebUrl = value ?? null; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] _customerContact; + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType _dataBaseType; + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get => this._dataBaseType; set => this._dataBaseType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? _dataSafeStatus; + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get => this._dataSafeStatus; } + + /// Backing field for property. + private int? _dataStorageSizeInGb; + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DataStorageSizeInGb { get => this._dataStorageSizeInGb; set => this._dataStorageSizeInGb = value; } + + /// Backing field for property. + private int? _dataStorageSizeInTb; + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? _databaseEdition; + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => this._databaseEdition; set => this._databaseEdition = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// Backing field for property. + private string _dbVersion; + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DbVersion { get => this._dbVersion; set => this._dbVersion = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? _dbWorkload; + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => this._dbWorkload; set => this._dbWorkload = value; } + + /// Backing field for property. + private string _displayName; + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private int? _failedDataRecoveryInSecond; + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? FailedDataRecoveryInSecond { get => this._failedDataRecoveryInSecond; } + + /// Backing field for property. + private int? _inMemoryAreaInGb; + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? InMemoryAreaInGb { get => this._inMemoryAreaInGb; } + + /// Backing field for property. + private bool? _isAutoScalingEnabled; + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsAutoScalingEnabled { get => this._isAutoScalingEnabled; set => this._isAutoScalingEnabled = value; } + + /// Backing field for property. + private bool? _isAutoScalingForStorageEnabled; + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsAutoScalingForStorageEnabled { get => this._isAutoScalingForStorageEnabled; set => this._isAutoScalingForStorageEnabled = value; } + + /// Backing field for property. + private bool? _isLocalDataGuardEnabled; + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsLocalDataGuardEnabled { get => this._isLocalDataGuardEnabled; set => this._isLocalDataGuardEnabled = value; } + + /// Backing field for property. + private bool? _isMtlsConnectionRequired; + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsMtlsConnectionRequired { get => this._isMtlsConnectionRequired; set => this._isMtlsConnectionRequired = value; } + + /// Backing field for property. + private bool? _isPreview; + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsPreview { get => this._isPreview; } + + /// + /// Backing field for property. + /// + private bool? _isPreviewVersionWithServiceTermsAccepted; + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => this._isPreviewVersionWithServiceTermsAccepted; set => this._isPreviewVersionWithServiceTermsAccepted = value; } + + /// Backing field for property. + private bool? _isRemoteDataGuardEnabled; + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsRemoteDataGuardEnabled { get => this._isRemoteDataGuardEnabled; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? _licenseModel; + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? _lifecycleState; + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private int? _localAdgAutoFailoverMaxDataLossLimit; + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => this._localAdgAutoFailoverMaxDataLossLimit; set => this._localAdgAutoFailoverMaxDataLossLimit = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? _localDisasterRecoveryType; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get => this._localDisasterRecoveryType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary _localStandbyDb; + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => (this._localStandbyDb = this._localStandbyDb ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).LifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState)""); } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)LocalStandbyDb).TimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails _longTermBackupSchedule; + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails()); set => this._longTermBackupSchedule = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private int? _memoryPerOracleComputeUnitInGb; + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemoryPerOracleComputeUnitInGb { get => this._memoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => this._actualUsedDataStorageSizeInTb; set { {_actualUsedDataStorageSizeInTb = value;} } } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => this._allocatedStorageSizeInTb; set { {_allocatedStorageSizeInTb = value;} } } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => (this._apexDetail = this._apexDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsType()); set { {_apexDetail = value;} } } + + /// Internal Acessors for AvailableUpgradeVersion + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => this._availableUpgradeVersion; set { {_availableUpgradeVersion = value;} } } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => (this._connectionString = this._connectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringType()); set { {_connectionString = value;} } } + + /// Internal Acessors for ConnectionStringAllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)ConnectionString).AllConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => (this._connectionUrl = this._connectionUrl ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlType()); set { {_connectionUrl = value;} } } + + /// Internal Acessors for DataSafeStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => this._dataSafeStatus; set { {_dataSafeStatus = value;} } } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => this._failedDataRecoveryInSecond; set { {_failedDataRecoveryInSecond = value;} } } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => this._inMemoryAreaInGb; set { {_inMemoryAreaInGb = value;} } } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => this._isPreview; set { {_isPreview = value;} } } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => this._isRemoteDataGuardEnabled; set { {_isRemoteDataGuardEnabled = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for LocalDisasterRecoveryType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => this._localDisasterRecoveryType; set { {_localDisasterRecoveryType = value;} } } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => (this._localStandbyDb = this._localStandbyDb ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummary()); set { {_localStandbyDb = value;} } } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails()); set { {_longTermBackupSchedule = value;} } } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => this._memoryPerOracleComputeUnitInGb; set { {_memoryPerOracleComputeUnitInGb = value;} } } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => this._nextLongTermBackupTimeStamp; set { {_nextLongTermBackupTimeStamp = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for OperationsInsightsStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => this._operationsInsightsStatus; set { {_operationsInsightsStatus = value;} } } + + /// Internal Acessors for PeerDbId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PeerDbId { get => this._peerDbId; set { {_peerDbId = value;} } } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => this._privateEndpoint; set { {_privateEndpoint = value;} } } + + /// Internal Acessors for ProvisionableCpu + int[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => this._provisionableCpu; set { {_provisionableCpu = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for RemoteDisasterRecoveryConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.RemoteDisasterRecoveryConfiguration { get => (this._remoteDisasterRecoveryConfiguration = this._remoteDisasterRecoveryConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetails()); set { {_remoteDisasterRecoveryConfiguration = value;} } } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsType()); set { {_scheduledOperation = value;} } } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).DayOfWeek = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => this._serviceConsoleUrl; set { {_serviceConsoleUrl = value;} } } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => this._sqlWebDeveloperUrl; set { {_sqlWebDeveloperUrl = value;} } } + + /// Internal Acessors for SupportedRegionsToCloneTo + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => this._supportedRegionsToCloneTo; set { {_supportedRegionsToCloneTo = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => this._timeDataGuardRoleChanged; set { {_timeDataGuardRoleChanged = value;} } } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => this._timeDeletionOfFreeAutonomousDatabase; set { {_timeDeletionOfFreeAutonomousDatabase = value;} } } + + /// Internal Acessors for TimeDisasterRecoveryRoleChanged + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDisasterRecoveryRoleChanged { get => this._timeDisasterRecoveryRoleChanged; set { {_timeDisasterRecoveryRoleChanged = value;} } } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => this._timeLocalDataGuardEnabled; set { {_timeLocalDataGuardEnabled = value;} } } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => this._timeMaintenanceBegin; set { {_timeMaintenanceBegin = value;} } } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => this._timeMaintenanceEnd; set { {_timeMaintenanceEnd = value;} } } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => this._timeOfLastFailover; set { {_timeOfLastFailover = value;} } } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => this._timeOfLastRefresh; set { {_timeOfLastRefresh = value;} } } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => this._timeOfLastRefreshPoint; set { {_timeOfLastRefreshPoint = value;} } } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => this._timeOfLastSwitchover; set { {_timeOfLastSwitchover = value;} } } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => this._timeReclamationOfFreeAutonomousDatabase; set { {_timeReclamationOfFreeAutonomousDatabase = value;} } } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => this._usedDataStorageSizeInGb; set { {_usedDataStorageSizeInGb = value;} } } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => this._usedDataStorageSizeInTb; set { {_usedDataStorageSizeInTb = value;} } } + + /// Backing field for property. + private string _ncharacterSet; + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NcharacterSet { get => this._ncharacterSet; set => this._ncharacterSet = value; } + + /// Backing field for property. + private global::System.DateTime? _nextLongTermBackupTimeStamp; + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => this._nextLongTermBackupTimeStamp; } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? _openMode; + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => this._openMode; set => this._openMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? _operationsInsightsStatus; + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get => this._operationsInsightsStatus; } + + /// Backing field for property. + private string[] _peerDbId; + + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] PeerDbId { get => this._peerDbId; } + + /// Backing field for property. + private string _peerDbId1; + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PeerDbId1 { get => this._peerDbId1; set => this._peerDbId1 = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? _permissionLevel; + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => this._permissionLevel; set => this._permissionLevel = value; } + + /// Backing field for property. + private string _privateEndpoint; + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PrivateEndpoint { get => this._privateEndpoint; } + + /// Backing field for property. + private string _privateEndpointIP; + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PrivateEndpointIP { get => this._privateEndpointIP; set => this._privateEndpointIP = value; } + + /// Backing field for property. + private string _privateEndpointLabel; + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PrivateEndpointLabel { get => this._privateEndpointLabel; set => this._privateEndpointLabel = value; } + + /// Backing field for property. + private int[] _provisionableCpu; + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int[] ProvisionableCpu { get => this._provisionableCpu; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails _remoteDisasterRecoveryConfiguration; + + /// Indicates remote disaster recovery configuration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get => (this._remoteDisasterRecoveryConfiguration = this._remoteDisasterRecoveryConfiguration ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetails()); } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).DisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).DisasterRecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).IsReplicateAutomaticBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).IsReplicateAutomaticBackup = value ?? default(bool); } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).IsSnapshotStandby; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).IsSnapshotStandby = value ?? default(bool); } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).TimeSnapshotStandbyEnabledTill; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)RemoteDisasterRecoveryConfiguration).TimeSnapshotStandbyEnabledTill = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? _role; + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => this._role; set => this._role = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType _scheduledOperation; + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsType()); set => this._scheduledOperation = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)ScheduledOperation).ScheduledStopTime = value ?? null; } + + /// Backing field for property. + private string _serviceConsoleUrl; + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ServiceConsoleUrl { get => this._serviceConsoleUrl; } + + /// Backing field for property. + private string _sqlWebDeveloperUrl; + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SqlWebDeveloperUrl { get => this._sqlWebDeveloperUrl; } + + /// Backing field for property. + private string _subnetId; + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private string[] _supportedRegionsToCloneTo; + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] SupportedRegionsToCloneTo { get => this._supportedRegionsToCloneTo; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private string _timeDataGuardRoleChanged; + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeDataGuardRoleChanged { get => this._timeDataGuardRoleChanged; } + + /// Backing field for property. + private string _timeDeletionOfFreeAutonomousDatabase; + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeDeletionOfFreeAutonomousDatabase { get => this._timeDeletionOfFreeAutonomousDatabase; } + + /// Backing field for property. + private global::System.DateTime? _timeDisasterRecoveryRoleChanged; + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeDisasterRecoveryRoleChanged { get => this._timeDisasterRecoveryRoleChanged; } + + /// Backing field for property. + private string _timeLocalDataGuardEnabled; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeLocalDataGuardEnabled { get => this._timeLocalDataGuardEnabled; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceBegin; + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceBegin { get => this._timeMaintenanceBegin; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceEnd; + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceEnd { get => this._timeMaintenanceEnd; } + + /// Backing field for property. + private string _timeOfLastFailover; + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeOfLastFailover { get => this._timeOfLastFailover; } + + /// Backing field for property. + private string _timeOfLastRefresh; + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeOfLastRefresh { get => this._timeOfLastRefresh; } + + /// Backing field for property. + private string _timeOfLastRefreshPoint; + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeOfLastRefreshPoint { get => this._timeOfLastRefreshPoint; } + + /// Backing field for property. + private string _timeOfLastSwitchover; + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeOfLastSwitchover { get => this._timeOfLastSwitchover; } + + /// + /// Backing field for property. + /// + private string _timeReclamationOfFreeAutonomousDatabase; + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeReclamationOfFreeAutonomousDatabase { get => this._timeReclamationOfFreeAutonomousDatabase; } + + /// Backing field for property. + private int? _usedDataStorageSizeInGb; + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? UsedDataStorageSizeInGb { get => this._usedDataStorageSizeInGb; } + + /// Backing field for property. + private int? _usedDataStorageSizeInTb; + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? UsedDataStorageSizeInTb { get => this._usedDataStorageSizeInTb; } + + /// Backing field for property. + private string _vnetId; + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string VnetId { get => this._vnetId; set => this._vnetId = value; } + + /// Backing field for property. + private string[] _whitelistedIP; + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] WhitelistedIP { get => this._whitelistedIP; set => this._whitelistedIP = value; } + + /// Creates an new instance. + public AutonomousDatabaseBaseProperties() + { + + } + } + /// Autonomous Database base resource model. + public partial interface IAutonomousDatabaseBaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current amount of storage in use for user and system data, in terabytes (TB).", + SerializedName = @"actualUsedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? ActualUsedDataStorageSizeInTb { get; } + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringLow { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringMedium { get; set; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of storage currently allocated for the database tables and billed for, rounded up.", + SerializedName = @"allocatedStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AllocatedStorageSizeInTb { get; } + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle APEX Application Development version.", + SerializedName = @"apexVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle REST Data Services (ORDS) version.", + SerializedName = @"ordsVersion", + PossibleTypes = new [] { typeof(string) })] + string ApexDetailOrdsVersion { get; set; } + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Autonomous Database ID", + SerializedName = @"autonomousDatabaseId", + PossibleTypes = new [] { typeof(string) })] + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list is empty.", + SerializedName = @"availableUpgradeVersions", + PossibleTypes = new [] { typeof(string) })] + string[] AvailableUpgradeVersion { get; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the autonomous database.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute model of the Autonomous Database.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"dedicated", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringDedicated { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringLow { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string ConnectionStringMedium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata.", + SerializedName = @"profiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get; set; } + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle Application Express (APEX) URL.", + SerializedName = @"apexUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Database Transforms for the Autonomous Database.", + SerializedName = @"databaseTransformsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlDatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Graph Studio for the Autonomous Database.", + SerializedName = @"graphStudioUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlGraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database.", + SerializedName = @"machineLearningNotebookUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the MongoDB API for the Autonomous Database.", + SerializedName = @"mongoDbUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlMongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database.", + SerializedName = @"ordsUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlOrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle SQL Developer Web URL.", + SerializedName = @"sqlDevWebUrl", + PossibleTypes = new [] { typeof(string) })] + string ConnectionUrlSqlDevWebUrl { get; set; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Database type to be created.", + SerializedName = @"dataBaseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of the Data Safe registration for this Autonomous Database.", + SerializedName = @"dataSafeStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + string DbVersion { get; set; } + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates the number of seconds of data loss for a Data Guard failover.", + SerializedName = @"failedDataRecoveryInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? FailedDataRecoveryInSecond { get; } + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The area assigned to In-Memory tables in Autonomous Database.", + SerializedName = @"inMemoryAreaInGbs", + PossibleTypes = new [] { typeof(int) })] + int? InMemoryAreaInGb { get; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates if the Autonomous Database version is a preview version.", + SerializedName = @"isPreview", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreview { get; } + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database preview version is being provisioned.", + SerializedName = @"isPreviewVersionWithServiceTermsAccepted", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates whether the Autonomous Database has Cross Region Data Guard enabled.", + SerializedName = @"isRemoteDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRemoteDataGuardEnabled { get; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"localDisasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"lagTimeInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? LocalStandbyDbLagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbLifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of the Autonomous Database.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of memory (in GBs) enabled per ECPU or OCPU.", + SerializedName = @"memoryPerOracleComputeUnitInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemoryPerOracleComputeUnitInGb { get; } + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the Autonomous Database.", + SerializedName = @"ncharacterSet", + PossibleTypes = new [] { typeof(string) })] + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when the next long-term backup would be created.", + SerializedName = @"nextLongTermBackupTimeStamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? NextLongTermBackupTimeStamp { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Database ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status of Operations Insights for this Autonomous Database.", + SerializedName = @"operationsInsightsStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get; } + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same region as the source primary database do not have Azure IDs.", + SerializedName = @"peerDbIds", + PossibleTypes = new [] { typeof(string) })] + string[] PeerDbId { get; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId1 { get; set; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The private endpoint for the resource.", + SerializedName = @"privateEndpoint", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpoint { get; } + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The private endpoint Ip address for the resource.", + SerializedName = @"privateEndpointIp", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource's private endpoint label.", + SerializedName = @"privateEndpointLabel", + PossibleTypes = new [] { typeof(string) })] + string PrivateEndpointLabel { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An array of CPU values that an Autonomous Database can be scaled to.", + SerializedName = @"provisionableCpus", + PossibleTypes = new [] { typeof(int) })] + int[] ProvisionableCpu { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"disasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get; set; } + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + SerializedName = @"isReplicateAutomaticBackups", + PossibleTypes = new [] { typeof(bool) })] + bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get; set; } + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.", + SerializedName = @"isSnapshotStandby", + PossibleTypes = new [] { typeof(bool) })] + bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get; set; } + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.", + SerializedName = @"timeSnapshotStandbyEnabledTill", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URL of the Service Console for the Autonomous Database.", + SerializedName = @"serviceConsoleUrl", + PossibleTypes = new [] { typeof(string) })] + string ServiceConsoleUrl { get; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The SQL Web Developer URL for the Oracle Autonomous Database.", + SerializedName = @"sqlWebDeveloperUrl", + PossibleTypes = new [] { typeof(string) })] + string SqlWebDeveloperUrl { get; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database.", + SerializedName = @"supportedRegionsToCloneTo", + PossibleTypes = new [] { typeof(string) })] + string[] SupportedRegionsToCloneTo { get; } + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time that the database was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Autonomous Data Guard role was switched for the Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDataGuardRoleChanged { get; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Always Free database will be automatically deleted because of inactivity.", + SerializedName = @"timeDeletionOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeDeletionOfFreeAutonomousDatabase { get; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeDisasterRecoveryRoleChanged { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"timeLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(string) })] + string TimeLocalDataGuardEnabled { get; } + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when maintenance will begin.", + SerializedName = @"timeMaintenanceBegin", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceBegin { get; } + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when maintenance will end.", + SerializedName = @"timeMaintenanceEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceEnd { get; } + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The timestamp of the last failover operation.", + SerializedName = @"timeOfLastFailover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastFailover { get; } + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when last refresh happened.", + SerializedName = @"timeOfLastRefresh", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefresh { get; } + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The refresh point timestamp (UTC).", + SerializedName = @"timeOfLastRefreshPoint", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastRefreshPoint { get; } + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The timestamp of the last switchover operation for the Autonomous Database.", + SerializedName = @"timeOfLastSwitchover", + PossibleTypes = new [] { typeof(string) })] + string TimeOfLastSwitchover { get; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the Always Free database will be stopped because of inactivity.", + SerializedName = @"timeReclamationOfFreeAutonomousDatabase", + PossibleTypes = new [] { typeof(string) })] + string TimeReclamationOfFreeAutonomousDatabase { get; } + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The storage space consumed by Autonomous Database in GBs.", + SerializedName = @"usedDataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInGb { get; } + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The amount of storage that has been used, in terabytes.", + SerializedName = @"usedDataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? UsedDataStorageSizeInTb { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + string[] WhitelistedIP { get; set; } + + } + /// Autonomous Database base resource model. + internal partial interface IAutonomousDatabaseBasePropertiesInternal + + { + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + double? ActualUsedDataStorageSizeInTb { get; set; } + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// + /// 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. + /// + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string AllConnectionStringLow { get; set; } + /// + /// 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. + /// + string AllConnectionStringMedium { get; set; } + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + double? AllocatedStorageSizeInTb { get; set; } + /// Information about Oracle APEX Application Development. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ApexDetail { get; set; } + /// The Oracle APEX Application Development version. + string ApexDetailApexVersion { get; set; } + /// The Oracle REST Data Services (ORDS) version. + string ApexDetailOrdsVersion { get; set; } + /// Autonomous Database ID + string AutonomousDatabaseId { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + string[] AvailableUpgradeVersion { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The character set for the autonomous database. + string CharacterSet { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The compute model of the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The connection string used to connect to the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConnectionString { get; set; } + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType ConnectionStringAllConnectionString { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + string ConnectionStringDedicated { get; set; } + /// + /// 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. + /// + string ConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string ConnectionStringLow { get; set; } + /// + /// 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. + /// + string ConnectionStringMedium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConnectionUrl { get; set; } + /// Oracle Application Express (APEX) URL. + string ConnectionUrlApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + string ConnectionUrlDatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + string ConnectionUrlGraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + string ConnectionUrlMachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + string ConnectionUrlMongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + string ConnectionUrlOrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + string ConnectionUrlSqlDevWebUrl { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// Database type to be created. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get; set; } + /// Status of the Data Safe registration for this Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// A valid Oracle Database version for Autonomous Database. + string DbVersion { get; set; } + /// The Autonomous Database workload type + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// Indicates the number of seconds of data loss for a Data Guard failover. + int? FailedDataRecoveryInSecond { get; set; } + /// The area assigned to In-Memory tables in Autonomous Database. + int? InMemoryAreaInGb { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// Indicates if the Autonomous Database version is a preview version. + bool? IsPreview { get; set; } + /// Specifies if the Autonomous Database preview version is being provisioned. + bool? IsPreviewVersionWithServiceTermsAccepted { get; set; } + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + bool? IsRemoteDataGuardEnabled { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// Views lifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get; set; } + /// + /// 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 + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get; set; } + /// Local Autonomous Disaster Recovery standby database details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary LocalStandbyDb { get; set; } + /// + /// 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. + /// + int? LocalStandbyDbLagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + string LocalStandbyDbLifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + int? MemoryPerOracleComputeUnitInGb { get; set; } + /// The character set for the Autonomous Database. + string NcharacterSet { get; set; } + /// The date and time when the next long-term backup would be created. + global::System.DateTime? NextLongTermBackupTimeStamp { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Database ocid + string Ocid { get; set; } + /// Indicates the Autonomous Database mode. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// Status of Operations Insights for this Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get; set; } + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + string[] PeerDbId { get; set; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + string PeerDbId1 { get; set; } + /// The Autonomous Database permission level. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// The private endpoint for the resource. + string PrivateEndpoint { get; set; } + /// The private endpoint Ip address for the resource. + string PrivateEndpointIP { get; set; } + /// The resource's private endpoint label. + string PrivateEndpointLabel { get; set; } + /// An array of CPU values that an Autonomous Database can be scaled to. + int[] ProvisionableCpu { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// Indicates remote disaster recovery configuration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get; set; } + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get; set; } + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get; set; } + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get; set; } + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// The URL of the Service Console for the Autonomous Database. + string ServiceConsoleUrl { get; set; } + /// The SQL Web Developer URL for the Oracle Autonomous Database. + string SqlWebDeveloperUrl { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + string[] SupportedRegionsToCloneTo { get; set; } + /// The date and time that the database was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + string TimeDeletionOfFreeAutonomousDatabase { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + global::System.DateTime? TimeDisasterRecoveryRoleChanged { get; set; } + /// + /// 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. + /// + string TimeLocalDataGuardEnabled { get; set; } + /// The date and time when maintenance will begin. + global::System.DateTime? TimeMaintenanceBegin { get; set; } + /// The date and time when maintenance will end. + global::System.DateTime? TimeMaintenanceEnd { get; set; } + /// The timestamp of the last failover operation. + string TimeOfLastFailover { get; set; } + /// The date and time when last refresh happened. + string TimeOfLastRefresh { get; set; } + /// The refresh point timestamp (UTC). + string TimeOfLastRefreshPoint { get; set; } + /// The timestamp of the last switchover operation for the Autonomous Database. + string TimeOfLastSwitchover { get; set; } + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + string TimeReclamationOfFreeAutonomousDatabase { get; set; } + /// The storage space consumed by Autonomous Database in GBs. + int? UsedDataStorageSizeInGb { get; set; } + /// The amount of storage that has been used, in terabytes. + int? UsedDataStorageSizeInTb { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// + /// 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'] + /// + string[] WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.json.cs new file mode 100644 index 000000000000..067a7b719659 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseBaseProperties.json.cs @@ -0,0 +1,462 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database base resource model. + public partial class AutonomousDatabaseBaseProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBaseProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_remoteDisasterRecoveryConfiguration = If( json?.PropertyT("remoteDisasterRecoveryConfiguration"), out var __jsonRemoteDisasterRecoveryConfiguration) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetails.FromJson(__jsonRemoteDisasterRecoveryConfiguration) : RemoteDisasterRecoveryConfiguration;} + {_localStandbyDb = If( json?.PropertyT("localStandbyDb"), out var __jsonLocalStandbyDb) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummary.FromJson(__jsonLocalStandbyDb) : LocalStandbyDb;} + {_scheduledOperation = If( json?.PropertyT("scheduledOperations"), out var __jsonScheduledOperations) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsType.FromJson(__jsonScheduledOperations) : ScheduledOperation;} + {_apexDetail = If( json?.PropertyT("apexDetails"), out var __jsonApexDetails) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsType.FromJson(__jsonApexDetails) : ApexDetail;} + {_connectionString = If( json?.PropertyT("connectionStrings"), out var __jsonConnectionStrings) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringType.FromJson(__jsonConnectionStrings) : ConnectionString;} + {_connectionUrl = If( json?.PropertyT("connectionUrls"), out var __jsonConnectionUrls) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlType.FromJson(__jsonConnectionUrls) : ConnectionUrl;} + {_longTermBackupSchedule = If( json?.PropertyT("longTermBackupSchedule"), out var __jsonLongTermBackupSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails.FromJson(__jsonLongTermBackupSchedule) : LongTermBackupSchedule;} + {_adminPassword = If( json?.PropertyT("adminPassword"), out var __jsonAdminPassword) ? new System.Net.NetworkCredential("",(string)__jsonAdminPassword).SecurePassword : AdminPassword;} + {_dataBaseType = If( json?.PropertyT("dataBaseType"), out var __jsonDataBaseType) ? (string)__jsonDataBaseType : (string)DataBaseType;} + {_autonomousMaintenanceScheduleType = If( json?.PropertyT("autonomousMaintenanceScheduleType"), out var __jsonAutonomousMaintenanceScheduleType) ? (string)__jsonAutonomousMaintenanceScheduleType : (string)AutonomousMaintenanceScheduleType;} + {_characterSet = If( json?.PropertyT("characterSet"), out var __jsonCharacterSet) ? (string)__jsonCharacterSet : (string)CharacterSet;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (float?)__jsonComputeCount : ComputeCount;} + {_computeModel = If( json?.PropertyT("computeModel"), out var __jsonComputeModel) ? (string)__jsonComputeModel : (string)ComputeModel;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : CpuCoreCount;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContact.FromJson(__u) )) ))() : null : CustomerContact;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (int?)__jsonDataStorageSizeInTbs : DataStorageSizeInTb;} + {_dataStorageSizeInGb = If( json?.PropertyT("dataStorageSizeInGbs"), out var __jsonDataStorageSizeInGbs) ? (int?)__jsonDataStorageSizeInGbs : DataStorageSizeInGb;} + {_dbVersion = If( json?.PropertyT("dbVersion"), out var __jsonDbVersion) ? (string)__jsonDbVersion : (string)DbVersion;} + {_dbWorkload = If( json?.PropertyT("dbWorkload"), out var __jsonDbWorkload) ? (string)__jsonDbWorkload : (string)DbWorkload;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_isAutoScalingEnabled = If( json?.PropertyT("isAutoScalingEnabled"), out var __jsonIsAutoScalingEnabled) ? (bool?)__jsonIsAutoScalingEnabled : IsAutoScalingEnabled;} + {_isAutoScalingForStorageEnabled = If( json?.PropertyT("isAutoScalingForStorageEnabled"), out var __jsonIsAutoScalingForStorageEnabled) ? (bool?)__jsonIsAutoScalingForStorageEnabled : IsAutoScalingForStorageEnabled;} + {_peerDbId = If( json?.PropertyT("peerDbIds"), out var __jsonPeerDbIds) ? If( __jsonPeerDbIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : PeerDbId;} + {_peerDbId1 = If( json?.PropertyT("peerDbId"), out var __jsonPeerDbId) ? (string)__jsonPeerDbId : (string)PeerDbId1;} + {_isLocalDataGuardEnabled = If( json?.PropertyT("isLocalDataGuardEnabled"), out var __jsonIsLocalDataGuardEnabled) ? (bool?)__jsonIsLocalDataGuardEnabled : IsLocalDataGuardEnabled;} + {_isRemoteDataGuardEnabled = If( json?.PropertyT("isRemoteDataGuardEnabled"), out var __jsonIsRemoteDataGuardEnabled) ? (bool?)__jsonIsRemoteDataGuardEnabled : IsRemoteDataGuardEnabled;} + {_localDisasterRecoveryType = If( json?.PropertyT("localDisasterRecoveryType"), out var __jsonLocalDisasterRecoveryType) ? (string)__jsonLocalDisasterRecoveryType : (string)LocalDisasterRecoveryType;} + {_timeDisasterRecoveryRoleChanged = If( json?.PropertyT("timeDisasterRecoveryRoleChanged"), out var __jsonTimeDisasterRecoveryRoleChanged) ? global::System.DateTime.TryParse((string)__jsonTimeDisasterRecoveryRoleChanged, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeDisasterRecoveryRoleChangedValue) ? __jsonTimeDisasterRecoveryRoleChangedValue : TimeDisasterRecoveryRoleChanged : TimeDisasterRecoveryRoleChanged;} + {_failedDataRecoveryInSecond = If( json?.PropertyT("failedDataRecoveryInSeconds"), out var __jsonFailedDataRecoveryInSeconds) ? (int?)__jsonFailedDataRecoveryInSeconds : FailedDataRecoveryInSecond;} + {_isMtlsConnectionRequired = If( json?.PropertyT("isMtlsConnectionRequired"), out var __jsonIsMtlsConnectionRequired) ? (bool?)__jsonIsMtlsConnectionRequired : IsMtlsConnectionRequired;} + {_isPreviewVersionWithServiceTermsAccepted = If( json?.PropertyT("isPreviewVersionWithServiceTermsAccepted"), out var __jsonIsPreviewVersionWithServiceTermsAccepted) ? (bool?)__jsonIsPreviewVersionWithServiceTermsAccepted : IsPreviewVersionWithServiceTermsAccepted;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)LicenseModel;} + {_ncharacterSet = If( json?.PropertyT("ncharacterSet"), out var __jsonNcharacterSet) ? (string)__jsonNcharacterSet : (string)NcharacterSet;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_privateEndpointIP = If( json?.PropertyT("privateEndpointIp"), out var __jsonPrivateEndpointIP) ? (string)__jsonPrivateEndpointIP : (string)PrivateEndpointIP;} + {_privateEndpointLabel = If( json?.PropertyT("privateEndpointLabel"), out var __jsonPrivateEndpointLabel) ? (string)__jsonPrivateEndpointLabel : (string)PrivateEndpointLabel;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)OciUrl;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId;} + {_vnetId = If( json?.PropertyT("vnetId"), out var __jsonVnetId) ? (string)__jsonVnetId : (string)VnetId;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : TimeCreated : TimeCreated;} + {_timeMaintenanceBegin = If( json?.PropertyT("timeMaintenanceBegin"), out var __jsonTimeMaintenanceBegin) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceBegin, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceBeginValue) ? __jsonTimeMaintenanceBeginValue : TimeMaintenanceBegin : TimeMaintenanceBegin;} + {_timeMaintenanceEnd = If( json?.PropertyT("timeMaintenanceEnd"), out var __jsonTimeMaintenanceEnd) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceEndValue) ? __jsonTimeMaintenanceEndValue : TimeMaintenanceEnd : TimeMaintenanceEnd;} + {_actualUsedDataStorageSizeInTb = If( json?.PropertyT("actualUsedDataStorageSizeInTbs"), out var __jsonActualUsedDataStorageSizeInTbs) ? (double?)__jsonActualUsedDataStorageSizeInTbs : ActualUsedDataStorageSizeInTb;} + {_allocatedStorageSizeInTb = If( json?.PropertyT("allocatedStorageSizeInTbs"), out var __jsonAllocatedStorageSizeInTbs) ? (double?)__jsonAllocatedStorageSizeInTbs : AllocatedStorageSizeInTb;} + {_availableUpgradeVersion = If( json?.PropertyT("availableUpgradeVersions"), out var __jsonAvailableUpgradeVersions) ? If( __jsonAvailableUpgradeVersions as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : AvailableUpgradeVersion;} + {_dataSafeStatus = If( json?.PropertyT("dataSafeStatus"), out var __jsonDataSafeStatus) ? (string)__jsonDataSafeStatus : (string)DataSafeStatus;} + {_databaseEdition = If( json?.PropertyT("databaseEdition"), out var __jsonDatabaseEdition) ? (string)__jsonDatabaseEdition : (string)DatabaseEdition;} + {_autonomousDatabaseId = If( json?.PropertyT("autonomousDatabaseId"), out var __jsonAutonomousDatabaseId) ? (string)__jsonAutonomousDatabaseId : (string)AutonomousDatabaseId;} + {_inMemoryAreaInGb = If( json?.PropertyT("inMemoryAreaInGbs"), out var __jsonInMemoryAreaInGbs) ? (int?)__jsonInMemoryAreaInGbs : InMemoryAreaInGb;} + {_nextLongTermBackupTimeStamp = If( json?.PropertyT("nextLongTermBackupTimeStamp"), out var __jsonNextLongTermBackupTimeStamp) ? global::System.DateTime.TryParse((string)__jsonNextLongTermBackupTimeStamp, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonNextLongTermBackupTimeStampValue) ? __jsonNextLongTermBackupTimeStampValue : NextLongTermBackupTimeStamp : NextLongTermBackupTimeStamp;} + {_isPreview = If( json?.PropertyT("isPreview"), out var __jsonIsPreview) ? (bool?)__jsonIsPreview : IsPreview;} + {_localAdgAutoFailoverMaxDataLossLimit = If( json?.PropertyT("localAdgAutoFailoverMaxDataLossLimit"), out var __jsonLocalAdgAutoFailoverMaxDataLossLimit) ? (int?)__jsonLocalAdgAutoFailoverMaxDataLossLimit : LocalAdgAutoFailoverMaxDataLossLimit;} + {_memoryPerOracleComputeUnitInGb = If( json?.PropertyT("memoryPerOracleComputeUnitInGbs"), out var __jsonMemoryPerOracleComputeUnitInGbs) ? (int?)__jsonMemoryPerOracleComputeUnitInGbs : MemoryPerOracleComputeUnitInGb;} + {_openMode = If( json?.PropertyT("openMode"), out var __jsonOpenMode) ? (string)__jsonOpenMode : (string)OpenMode;} + {_operationsInsightsStatus = If( json?.PropertyT("operationsInsightsStatus"), out var __jsonOperationsInsightsStatus) ? (string)__jsonOperationsInsightsStatus : (string)OperationsInsightsStatus;} + {_permissionLevel = If( json?.PropertyT("permissionLevel"), out var __jsonPermissionLevel) ? (string)__jsonPermissionLevel : (string)PermissionLevel;} + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? (string)__jsonPrivateEndpoint : (string)PrivateEndpoint;} + {_provisionableCpu = If( json?.PropertyT("provisionableCpus"), out var __jsonProvisionableCpus) ? If( __jsonProvisionableCpus as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(int) (__f is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber __e ? (int)__e : default(int))) ))() : null : ProvisionableCpu;} + {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)Role;} + {_serviceConsoleUrl = If( json?.PropertyT("serviceConsoleUrl"), out var __jsonServiceConsoleUrl) ? (string)__jsonServiceConsoleUrl : (string)ServiceConsoleUrl;} + {_sqlWebDeveloperUrl = If( json?.PropertyT("sqlWebDeveloperUrl"), out var __jsonSqlWebDeveloperUrl) ? (string)__jsonSqlWebDeveloperUrl : (string)SqlWebDeveloperUrl;} + {_supportedRegionsToCloneTo = If( json?.PropertyT("supportedRegionsToCloneTo"), out var __jsonSupportedRegionsToCloneTo) ? If( __jsonSupportedRegionsToCloneTo as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __b) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__b, (__a)=>(string) (__a is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString ___z ? (string)(___z.ToString()) : null)) ))() : null : SupportedRegionsToCloneTo;} + {_timeDataGuardRoleChanged = If( json?.PropertyT("timeDataGuardRoleChanged"), out var __jsonTimeDataGuardRoleChanged) ? (string)__jsonTimeDataGuardRoleChanged : (string)TimeDataGuardRoleChanged;} + {_timeDeletionOfFreeAutonomousDatabase = If( json?.PropertyT("timeDeletionOfFreeAutonomousDatabase"), out var __jsonTimeDeletionOfFreeAutonomousDatabase) ? (string)__jsonTimeDeletionOfFreeAutonomousDatabase : (string)TimeDeletionOfFreeAutonomousDatabase;} + {_timeLocalDataGuardEnabled = If( json?.PropertyT("timeLocalDataGuardEnabled"), out var __jsonTimeLocalDataGuardEnabled) ? (string)__jsonTimeLocalDataGuardEnabled : (string)TimeLocalDataGuardEnabled;} + {_timeOfLastFailover = If( json?.PropertyT("timeOfLastFailover"), out var __jsonTimeOfLastFailover) ? (string)__jsonTimeOfLastFailover : (string)TimeOfLastFailover;} + {_timeOfLastRefresh = If( json?.PropertyT("timeOfLastRefresh"), out var __jsonTimeOfLastRefresh) ? (string)__jsonTimeOfLastRefresh : (string)TimeOfLastRefresh;} + {_timeOfLastRefreshPoint = If( json?.PropertyT("timeOfLastRefreshPoint"), out var __jsonTimeOfLastRefreshPoint) ? (string)__jsonTimeOfLastRefreshPoint : (string)TimeOfLastRefreshPoint;} + {_timeOfLastSwitchover = If( json?.PropertyT("timeOfLastSwitchover"), out var __jsonTimeOfLastSwitchover) ? (string)__jsonTimeOfLastSwitchover : (string)TimeOfLastSwitchover;} + {_timeReclamationOfFreeAutonomousDatabase = If( json?.PropertyT("timeReclamationOfFreeAutonomousDatabase"), out var __jsonTimeReclamationOfFreeAutonomousDatabase) ? (string)__jsonTimeReclamationOfFreeAutonomousDatabase : (string)TimeReclamationOfFreeAutonomousDatabase;} + {_usedDataStorageSizeInGb = If( json?.PropertyT("usedDataStorageSizeInGbs"), out var __jsonUsedDataStorageSizeInGbs) ? (int?)__jsonUsedDataStorageSizeInGbs : UsedDataStorageSizeInGb;} + {_usedDataStorageSizeInTb = If( json?.PropertyT("usedDataStorageSizeInTbs"), out var __jsonUsedDataStorageSizeInTbs) ? (int?)__jsonUsedDataStorageSizeInTbs : UsedDataStorageSizeInTb;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_backupRetentionPeriodInDay = If( json?.PropertyT("backupRetentionPeriodInDays"), out var __jsonBackupRetentionPeriodInDays) ? (int?)__jsonBackupRetentionPeriodInDays : BackupRetentionPeriodInDay;} + {_whitelistedIP = If( json?.PropertyT("whitelistedIps"), out var __jsonWhitelistedIps) ? If( __jsonWhitelistedIps as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(___w, (___v)=>(string) (___v is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString ___u ? (string)(___u.ToString()) : null)) ))() : null : WhitelistedIP;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties. + /// Note: the Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties + /// interface is polymorphic, and the precise model class that will get deserialized is determined at runtime based on the + /// payload. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + if (!(node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json)) + { + return null; + } + // Polymorphic type -- select the appropriate constructor using the discriminator + + switch ( json.StringProperty("dataBaseType") ) + { + case "Clone": + { + return new AutonomousDatabaseCloneProperties(json); + } + case "CrossRegionDisasterRecovery": + { + return new AutonomousDatabaseCrossRegionDisasterRecoveryProperties(json); + } + case "CloneFromBackupTimestamp": + { + return new AutonomousDatabaseFromBackupTimestampProperties(json); + } + case "Regular": + { + return new AutonomousDatabaseProperties(json); + } + } + return new AutonomousDatabaseBaseProperties(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._remoteDisasterRecoveryConfiguration ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._remoteDisasterRecoveryConfiguration.ToJson(null,serializationMode) : null, "remoteDisasterRecoveryConfiguration" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._localStandbyDb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._localStandbyDb.ToJson(null,serializationMode) : null, "localStandbyDb" ,container.Add ); + } + AddIf( null != this._scheduledOperation ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._scheduledOperation.ToJson(null,serializationMode) : null, "scheduledOperations" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._apexDetail ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._apexDetail.ToJson(null,serializationMode) : null, "apexDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._connectionString ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._connectionString.ToJson(null,serializationMode) : null, "connectionStrings" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._connectionUrl ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._connectionUrl.ToJson(null,serializationMode) : null, "connectionUrls" ,container.Add ); + } + AddIf( null != this._longTermBackupSchedule ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._longTermBackupSchedule.ToJson(null,serializationMode) : null, "longTermBackupSchedule" ,container.Add ); + AddIf( null != (((object)this._adminPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._adminPassword))) : null, "adminPassword" ,container.Add ); + AddIf( null != (((object)this._dataBaseType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dataBaseType.ToString()) : null, "dataBaseType" ,container.Add ); + AddIf( null != (((object)this._autonomousMaintenanceScheduleType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._autonomousMaintenanceScheduleType.ToString()) : null, "autonomousMaintenanceScheduleType" ,container.Add ); + AddIf( null != (((object)this._characterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._characterSet.ToString()) : null, "characterSet" ,container.Add ); + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((float)this._computeCount) : null, "computeCount" ,container.Add ); + AddIf( null != (((object)this._computeModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._computeModel.ToString()) : null, "computeModel" ,container.Add ); + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + if (null != this._customerContact) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._customerContact ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customerContacts",__w); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dataStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dataStorageSizeInGb) : null, "dataStorageSizeInGbs" ,container.Add ); + AddIf( null != (((object)this._dbVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbVersion.ToString()) : null, "dbVersion" ,container.Add ); + AddIf( null != (((object)this._dbWorkload)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbWorkload.ToString()) : null, "dbWorkload" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != this._isAutoScalingEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isAutoScalingEnabled) : null, "isAutoScalingEnabled" ,container.Add ); + AddIf( null != this._isAutoScalingForStorageEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isAutoScalingForStorageEnabled) : null, "isAutoScalingForStorageEnabled" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._peerDbId) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._peerDbId ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("peerDbIds",__r); + } + } + AddIf( null != (((object)this._peerDbId1)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._peerDbId1.ToString()) : null, "peerDbId" ,container.Add ); + AddIf( null != this._isLocalDataGuardEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isLocalDataGuardEnabled) : null, "isLocalDataGuardEnabled" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isRemoteDataGuardEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isRemoteDataGuardEnabled) : null, "isRemoteDataGuardEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._localDisasterRecoveryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._localDisasterRecoveryType.ToString()) : null, "localDisasterRecoveryType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeDisasterRecoveryRoleChanged ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeDisasterRecoveryRoleChanged?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeDisasterRecoveryRoleChanged" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._failedDataRecoveryInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._failedDataRecoveryInSecond) : null, "failedDataRecoveryInSeconds" ,container.Add ); + } + AddIf( null != this._isMtlsConnectionRequired ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isMtlsConnectionRequired) : null, "isMtlsConnectionRequired" ,container.Add ); + AddIf( null != this._isPreviewVersionWithServiceTermsAccepted ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isPreviewVersionWithServiceTermsAccepted) : null, "isPreviewVersionWithServiceTermsAccepted" ,container.Add ); + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + AddIf( null != (((object)this._ncharacterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ncharacterSet.ToString()) : null, "ncharacterSet" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + AddIf( null != (((object)this._privateEndpointIP)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._privateEndpointIP.ToString()) : null, "privateEndpointIp" ,container.Add ); + AddIf( null != (((object)this._privateEndpointLabel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._privateEndpointLabel.ToString()) : null, "privateEndpointLabel" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AddIf( null != (((object)this._vnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._vnetId.ToString()) : null, "vnetId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeMaintenanceBegin ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeMaintenanceBegin?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceBegin" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeMaintenanceEnd ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeMaintenanceEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceEnd" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._actualUsedDataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._actualUsedDataStorageSizeInTb) : null, "actualUsedDataStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._allocatedStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._allocatedStorageSizeInTb) : null, "allocatedStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._availableUpgradeVersion) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __n in this._availableUpgradeVersion ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("availableUpgradeVersions",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._dataSafeStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dataSafeStatus.ToString()) : null, "dataSafeStatus" ,container.Add ); + } + AddIf( null != (((object)this._databaseEdition)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._databaseEdition.ToString()) : null, "databaseEdition" ,container.Add ); + AddIf( null != (((object)this._autonomousDatabaseId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._autonomousDatabaseId.ToString()) : null, "autonomousDatabaseId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._inMemoryAreaInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._inMemoryAreaInGb) : null, "inMemoryAreaInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._nextLongTermBackupTimeStamp ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLongTermBackupTimeStamp?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "nextLongTermBackupTimeStamp" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isPreview ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isPreview) : null, "isPreview" ,container.Add ); + } + AddIf( null != this._localAdgAutoFailoverMaxDataLossLimit ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._localAdgAutoFailoverMaxDataLossLimit) : null, "localAdgAutoFailoverMaxDataLossLimit" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._memoryPerOracleComputeUnitInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memoryPerOracleComputeUnitInGb) : null, "memoryPerOracleComputeUnitInGbs" ,container.Add ); + } + AddIf( null != (((object)this._openMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._openMode.ToString()) : null, "openMode" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._operationsInsightsStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._operationsInsightsStatus.ToString()) : null, "operationsInsightsStatus" ,container.Add ); + } + AddIf( null != (((object)this._permissionLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._permissionLevel.ToString()) : null, "permissionLevel" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._privateEndpoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._privateEndpoint.ToString()) : null, "privateEndpoint" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._provisionableCpu) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __i in this._provisionableCpu ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(__i) ,__h.Add); + } + container.Add("provisionableCpus",__h); + } + } + AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._serviceConsoleUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._serviceConsoleUrl.ToString()) : null, "serviceConsoleUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._sqlWebDeveloperUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sqlWebDeveloperUrl.ToString()) : null, "sqlWebDeveloperUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._supportedRegionsToCloneTo) + { + var __c = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __d in this._supportedRegionsToCloneTo ) + { + AddIf(null != (((object)__d)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__d.ToString()) : null ,__c.Add); + } + container.Add("supportedRegionsToCloneTo",__c); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeDataGuardRoleChanged)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeDataGuardRoleChanged.ToString()) : null, "timeDataGuardRoleChanged" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeDeletionOfFreeAutonomousDatabase)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeDeletionOfFreeAutonomousDatabase.ToString()) : null, "timeDeletionOfFreeAutonomousDatabase" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeLocalDataGuardEnabled)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeLocalDataGuardEnabled.ToString()) : null, "timeLocalDataGuardEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeOfLastFailover)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeOfLastFailover.ToString()) : null, "timeOfLastFailover" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeOfLastRefresh)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeOfLastRefresh.ToString()) : null, "timeOfLastRefresh" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeOfLastRefreshPoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeOfLastRefreshPoint.ToString()) : null, "timeOfLastRefreshPoint" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeOfLastSwitchover)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeOfLastSwitchover.ToString()) : null, "timeOfLastSwitchover" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeReclamationOfFreeAutonomousDatabase)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeReclamationOfFreeAutonomousDatabase.ToString()) : null, "timeReclamationOfFreeAutonomousDatabase" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._usedDataStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._usedDataStorageSizeInGb) : null, "usedDataStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._usedDataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._usedDataStorageSizeInTb) : null, "usedDataStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + AddIf( null != this._backupRetentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._backupRetentionPeriodInDay) : null, "backupRetentionPeriodInDays" ,container.Add ); + if (null != this._whitelistedIP) + { + var ___x = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var ___y in this._whitelistedIP ) + { + AddIf(null != (((object)___y)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(___y.ToString()) : null ,___x.Add); + } + container.Add("whitelistedIps",___x); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.PowerShell.cs new file mode 100644 index 000000000000..d8d331919ef8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDatabaseCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetTypeConverter))] + public partial class AutonomousDatabaseCharacterSet + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCharacterSet(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCharacterSet(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCharacterSet(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCharacterSet(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDatabaseCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetTypeConverter))] + public partial interface IAutonomousDatabaseCharacterSet + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.TypeConverter.cs new file mode 100644 index 000000000000..aa8d66f73a9d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseCharacterSetTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCharacterSet.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSet.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSet.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.cs new file mode 100644 index 000000000000..6250182ccc9e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSets resource definition + public partial class AutonomousDatabaseCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetPropertiesInternal)Property).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetPropertiesInternal)Property).CharacterSet = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AutonomousDatabaseCharacterSet() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// AutonomousDatabaseCharacterSets resource definition + public partial interface IAutonomousDatabaseCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Autonomous Database supported character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + + } + /// AutonomousDatabaseCharacterSets resource definition + internal partial interface IAutonomousDatabaseCharacterSetInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The Oracle Autonomous Database supported character sets. + string CharacterSet { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.json.cs new file mode 100644 index 000000000000..d748a152c07a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSet.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSets resource definition + public partial class AutonomousDatabaseCharacterSet + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCharacterSet(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseCharacterSet(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.PowerShell.cs new file mode 100644 index 000000000000..a4c8c3cb850c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.PowerShell.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a AutonomousDatabaseCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetListResultTypeConverter))] + public partial class AutonomousDatabaseCharacterSetListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCharacterSetListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCharacterSetListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCharacterSetListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCharacterSetListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a AutonomousDatabaseCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetListResultTypeConverter))] + public partial interface IAutonomousDatabaseCharacterSetListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.TypeConverter.cs new file mode 100644 index 000000000000..57a6e6d06adb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseCharacterSetListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCharacterSetListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.cs new file mode 100644 index 000000000000..7dee9d303dfa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabaseCharacterSet list operation. + public partial class AutonomousDatabaseCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet[] _value; + + /// The AutonomousDatabaseCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet[] Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseCharacterSetListResult() + { + + } + } + /// The response of a AutonomousDatabaseCharacterSet list operation. + public partial interface IAutonomousDatabaseCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabaseCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AutonomousDatabaseCharacterSet items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet[] Value { get; set; } + + } + /// The response of a AutonomousDatabaseCharacterSet list operation. + internal partial interface IAutonomousDatabaseCharacterSetListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabaseCharacterSet items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.json.cs new file mode 100644 index 000000000000..a06ce5d4f285 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetListResult.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabaseCharacterSet list operation. + public partial class AutonomousDatabaseCharacterSetListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCharacterSetListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSet.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseCharacterSetListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.PowerShell.cs new file mode 100644 index 000000000000..4c787096b932 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.PowerShell.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDatabaseCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetPropertiesTypeConverter))] + public partial class AutonomousDatabaseCharacterSetProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCharacterSetProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCharacterSetProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCharacterSetProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCharacterSetProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDatabaseCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCharacterSetPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseCharacterSetProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.TypeConverter.cs new file mode 100644 index 000000000000..dc414248dd8d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseCharacterSetPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCharacterSetProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCharacterSetProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.cs new file mode 100644 index 000000000000..89dba096aa23 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSet resource model + public partial class AutonomousDatabaseCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetPropertiesInternal + { + + /// Backing field for property. + private string _characterSet; + + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CharacterSet { get => this._characterSet; set => this._characterSet = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseCharacterSetProperties() + { + + } + } + /// AutonomousDatabaseCharacterSet resource model + public partial interface IAutonomousDatabaseCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The Oracle Autonomous Database supported character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Oracle Autonomous Database supported character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + + } + /// AutonomousDatabaseCharacterSet resource model + internal partial interface IAutonomousDatabaseCharacterSetPropertiesInternal + + { + /// The Oracle Autonomous Database supported character sets. + string CharacterSet { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.json.cs new file mode 100644 index 000000000000..d824400f0e70 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCharacterSetProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseCharacterSet resource model + public partial class AutonomousDatabaseCharacterSetProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCharacterSetProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_characterSet = If( json?.PropertyT("characterSet"), out var __jsonCharacterSet) ? (string)__jsonCharacterSet : (string)CharacterSet;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseCharacterSetProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._characterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._characterSet.ToString()) : null, "characterSet" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.PowerShell.cs new file mode 100644 index 000000000000..7917fd29e5b6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.PowerShell.cs @@ -0,0 +1,1100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database clone resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseClonePropertiesTypeConverter))] + public partial class AutonomousDatabaseCloneProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCloneProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType?) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType.CreateFrom); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("CloneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).CloneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType) content.GetValueForProperty("CloneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).CloneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType.CreateFrom); + } + if (content.Contains("IsReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled = (bool?) content.GetValueForProperty("IsReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRefreshableClone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone = (bool?) content.GetValueForProperty("IsRefreshableClone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RefreshableModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType?) content.GetValueForProperty("RefreshableModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType.CreateFrom); + } + if (content.Contains("RefreshableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType?) content.GetValueForProperty("RefreshableStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType.CreateFrom); + } + if (content.Contains("TimeUntilReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled = (string) content.GetValueForProperty("TimeUntilReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCloneProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).Source = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType?) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).Source, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType.CreateFrom); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("CloneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).CloneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType) content.GetValueForProperty("CloneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).CloneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType.CreateFrom); + } + if (content.Contains("IsReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled = (bool?) content.GetValueForProperty("IsReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsReconnectCloneEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRefreshableClone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone = (bool?) content.GetValueForProperty("IsRefreshableClone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).IsRefreshableClone, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RefreshableModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType?) content.GetValueForProperty("RefreshableModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType.CreateFrom); + } + if (content.Contains("RefreshableStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType?) content.GetValueForProperty("RefreshableStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).RefreshableStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType.CreateFrom); + } + if (content.Contains("TimeUntilReconnectCloneEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled = (string) content.GetValueForProperty("TimeUntilReconnectCloneEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal)this).TimeUntilReconnectCloneEnabled, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCloneProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCloneProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database clone resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseClonePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseCloneProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.TypeConverter.cs new file mode 100644 index 000000000000..d619acb3cd03 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseClonePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCloneProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCloneProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCloneProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.cs new file mode 100644 index 000000000000..6cefcd084b1d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.cs @@ -0,0 +1,892 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database clone resource model. + public partial class AutonomousDatabaseCloneProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; } + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType _cloneType; + + /// The Autonomous Database clone type. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType CloneType { get => this._cloneType; set => this._cloneType = value; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel)""); } + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; } + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value ?? null /* model class */; } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType = value ; } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType)""); } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Backing field for property. + private bool? _isReconnectCloneEnabled; + + /// Indicates if the refreshable clone can be reconnected to its source database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsReconnectCloneEnabled { get => this._isReconnectCloneEnabled; } + + /// Backing field for property. + private bool? _isRefreshableClone; + + /// Indicates if the Autonomous Database is a refreshable clone. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsRefreshableClone { get => this._isRefreshableClone; } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; } + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState)""); } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value ?? null /* model class */; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint = value; } + + /// Internal Acessors for ProvisionableCpu + int[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState = value; } + + /// Internal Acessors for RemoteDisasterRecoveryConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeDisasterRecoveryRoleChanged + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb = value; } + + /// Internal Acessors for IsReconnectCloneEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal.IsReconnectCloneEnabled { get => this._isReconnectCloneEnabled; set { {_isReconnectCloneEnabled = value;} } } + + /// Internal Acessors for IsRefreshableClone + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal.IsRefreshableClone { get => this._isRefreshableClone; set { {_isRefreshableClone = value;} } } + + /// Internal Acessors for RefreshableStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseClonePropertiesInternal.RefreshableStatus { get => this._refreshableStatus; set { {_refreshableStatus = value;} } } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; } + + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PeerDbId1 { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1 = value ?? null; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel = value ?? null; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int[] ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType? _refreshableModel; + + /// The refresh mode of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType? RefreshableModel { get => this._refreshableModel; set => this._refreshableModel = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType? _refreshableStatus; + + /// The refresh status of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType? RefreshableStatus { get => this._refreshableStatus; } + + /// Indicates remote disaster recovery configuration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = value ?? default(bool); } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = value ?? default(bool); } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = value ?? default(global::System.DateTime); } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); } + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value ?? null /* model class */; } + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value ?? null /* model class */; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType? _source; + + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType? Source { get => this._source; set => this._source = value; } + + /// Backing field for property. + private string _sourceId; + + /// + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SourceId { get => this._sourceId; set => this._sourceId = value; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; } + + /// Backing field for property. + private string _timeUntilReconnectCloneEnabled; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeUntilReconnectCloneEnabled { get => this._timeUntilReconnectCloneEnabled; set => this._timeUntilReconnectCloneEnabled = value; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId = value ?? null; } + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabaseCloneProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + } + } + /// Autonomous Database clone resource model. + public partial interface IAutonomousDatabaseCloneProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties + { + /// The Autonomous Database clone type. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Autonomous Database clone type.", + SerializedName = @"cloneType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType CloneType { get; set; } + /// Indicates if the refreshable clone can be reconnected to its source database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates if the refreshable clone can be reconnected to its source database.", + SerializedName = @"isReconnectCloneEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsReconnectCloneEnabled { get; } + /// Indicates if the Autonomous Database is a refreshable clone. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates if the Autonomous Database is a refreshable clone.", + SerializedName = @"isRefreshableClone", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRefreshableClone { get; } + /// The refresh mode of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The refresh mode of the clone.", + SerializedName = @"refreshableModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType? RefreshableModel { get; set; } + /// The refresh status of the clone. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The refresh status of the clone.", + SerializedName = @"refreshableStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType? RefreshableStatus { get; } + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source of the database.", + SerializedName = @"source", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType? Source { get; set; } + /// + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database.", + SerializedName = @"sourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceId { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"timeUntilReconnectCloneEnabled", + PossibleTypes = new [] { typeof(string) })] + string TimeUntilReconnectCloneEnabled { get; set; } + + } + /// Autonomous Database clone resource model. + internal partial interface IAutonomousDatabaseClonePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal + { + /// The Autonomous Database clone type. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType CloneType { get; set; } + /// Indicates if the refreshable clone can be reconnected to its source database. + bool? IsReconnectCloneEnabled { get; set; } + /// Indicates if the Autonomous Database is a refreshable clone. + bool? IsRefreshableClone { get; set; } + /// The refresh mode of the clone. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType? RefreshableModel { get; set; } + /// The refresh status of the clone. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType? RefreshableStatus { get; set; } + /// The source of the database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType? Source { get; set; } + /// + /// The Azure resource ID of the Autonomous Database that was cloned to create the current Autonomous Database. + /// + string SourceId { get; set; } + /// + /// 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. + /// + string TimeUntilReconnectCloneEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.json.cs new file mode 100644 index 000000000000..33524a4f6822 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCloneProperties.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database clone resource model. + public partial class AutonomousDatabaseCloneProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCloneProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(json); + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)Source;} + {_sourceId = If( json?.PropertyT("sourceId"), out var __jsonSourceId) ? (string)__jsonSourceId : (string)SourceId;} + {_cloneType = If( json?.PropertyT("cloneType"), out var __jsonCloneType) ? (string)__jsonCloneType : (string)CloneType;} + {_isReconnectCloneEnabled = If( json?.PropertyT("isReconnectCloneEnabled"), out var __jsonIsReconnectCloneEnabled) ? (bool?)__jsonIsReconnectCloneEnabled : IsReconnectCloneEnabled;} + {_isRefreshableClone = If( json?.PropertyT("isRefreshableClone"), out var __jsonIsRefreshableClone) ? (bool?)__jsonIsRefreshableClone : IsRefreshableClone;} + {_refreshableModel = If( json?.PropertyT("refreshableModel"), out var __jsonRefreshableModel) ? (string)__jsonRefreshableModel : (string)RefreshableModel;} + {_refreshableStatus = If( json?.PropertyT("refreshableStatus"), out var __jsonRefreshableStatus) ? (string)__jsonRefreshableStatus : (string)RefreshableStatus;} + {_timeUntilReconnectCloneEnabled = If( json?.PropertyT("timeUntilReconnectCloneEnabled"), out var __jsonTimeUntilReconnectCloneEnabled) ? (string)__jsonTimeUntilReconnectCloneEnabled : (string)TimeUntilReconnectCloneEnabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCloneProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseCloneProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __autonomousDatabaseBaseProperties?.ToJson(container, serializationMode); + AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); + AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); + AddIf( null != (((object)this._cloneType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloneType.ToString()) : null, "cloneType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isReconnectCloneEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isReconnectCloneEnabled) : null, "isReconnectCloneEnabled" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isRefreshableClone ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isRefreshableClone) : null, "isRefreshableClone" ,container.Add ); + } + AddIf( null != (((object)this._refreshableModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._refreshableModel.ToString()) : null, "refreshableModel" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._refreshableStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._refreshableStatus.ToString()) : null, "refreshableStatus" ,container.Add ); + } + AddIf( null != (((object)this._timeUntilReconnectCloneEnabled)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeUntilReconnectCloneEnabled.ToString()) : null, "timeUntilReconnectCloneEnabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.PowerShell.cs new file mode 100644 index 000000000000..5ec792d24a8b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.PowerShell.cs @@ -0,0 +1,1085 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database Cross Region Disaster Recovery resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesTypeConverter))] + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseCrossRegionDisasterRecoveryProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceLocation = (string) content.GetValueForProperty("SourceLocation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceLocation, global::System.Convert.ToString); + } + if (content.Contains("SourceOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceOcid = (string) content.GetValueForProperty("SourceOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceOcid, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).RemoteDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) content.GetValueForProperty("RemoteDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).RemoteDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("IsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).IsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("IsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).IsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseCrossRegionDisasterRecoveryProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("SourceLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceLocation = (string) content.GetValueForProperty("SourceLocation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceLocation, global::System.Convert.ToString); + } + if (content.Contains("SourceOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceOcid = (string) content.GetValueForProperty("SourceOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).SourceOcid, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).RemoteDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) content.GetValueForProperty("RemoteDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).RemoteDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("IsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).IsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("IsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal)this).IsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseCrossRegionDisasterRecoveryProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseCrossRegionDisasterRecoveryProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database Cross Region Disaster Recovery resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseCrossRegionDisasterRecoveryProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.TypeConverter.cs new file mode 100644 index 000000000000..9706abc4d289 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseCrossRegionDisasterRecoveryProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseCrossRegionDisasterRecoveryProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseCrossRegionDisasterRecoveryProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs new file mode 100644 index 000000000000..17c54206f5ca --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.cs @@ -0,0 +1,866 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database Cross Region Disaster Recovery resource model. + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; } + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet = value ?? null; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel)""); } + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; } + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value ?? null /* model class */; } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType = value ; } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType)""); } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; } + + /// Backing field for property. + private bool? _isReplicateAutomaticBackup; + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsReplicateAutomaticBackup { get => this._isReplicateAutomaticBackup; set => this._isReplicateAutomaticBackup = value; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; } + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState)""); } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value ?? null /* model class */; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint = value; } + + /// Internal Acessors for ProvisionableCpu + int[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState = value; } + + /// Internal Acessors for RemoteDisasterRecoveryConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeDisasterRecoveryRoleChanged + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb = value; } + + /// Internal Acessors for Source + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal.Source { get => this._source; set { {_source = value;} } } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; } + + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PeerDbId1 { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1 = value ?? null; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel = value ?? null; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int[] ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; } + + /// Indicates remote disaster recovery configuration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = value ?? default(bool); } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = value ?? default(bool); } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = value ?? default(global::System.DateTime); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType _remoteDisasterRecoveryType; + + /// + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous + /// Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or + /// switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType RemoteDisasterRecoveryType { get => this._remoteDisasterRecoveryType; set => this._remoteDisasterRecoveryType = value; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); } + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value ?? null /* model class */; } + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value ?? null /* model class */; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; } + + /// Backing field for property. + private string _source= @"CrossRegionDisasterRecovery"; + + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Source { get => this._source; } + + /// Backing field for property. + private string _sourceId; + + /// + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SourceId { get => this._sourceId; set => this._sourceId = value; } + + /// Backing field for property. + private string _sourceLocation; + + /// The name of the region where source Autonomous Database exists. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SourceLocation { get => this._sourceLocation; set => this._sourceLocation = value; } + + /// Backing field for property. + private string _sourceOcid; + + /// The source database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SourceOcid { get => this._sourceOcid; set => this._sourceOcid = value; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId = value ?? null; } + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP = value ?? null /* arrayOf */; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseCrossRegionDisasterRecoveryProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + } + } + /// Autonomous Database Cross Region Disaster Recovery resource model. + public partial interface IAutonomousDatabaseCrossRegionDisasterRecoveryProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties + { + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + SerializedName = @"isReplicateAutomaticBackups", + PossibleTypes = new [] { typeof(bool) })] + bool? IsReplicateAutomaticBackup { get; set; } + /// + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous + /// Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or + /// switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"remoteDisasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType RemoteDisasterRecoveryType { get; set; } + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The source of the database.", + SerializedName = @"source", + PossibleTypes = new [] { typeof(string) })] + string Source { get; } + /// + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association.", + SerializedName = @"sourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceId { get; set; } + /// The name of the region where source Autonomous Database exists. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the region where source Autonomous Database exists.", + SerializedName = @"sourceLocation", + PossibleTypes = new [] { typeof(string) })] + string SourceLocation { get; set; } + /// The source database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The source database ocid", + SerializedName = @"sourceOcid", + PossibleTypes = new [] { typeof(string) })] + string SourceOcid { get; set; } + + } + /// Autonomous Database Cross Region Disaster Recovery resource model. + internal partial interface IAutonomousDatabaseCrossRegionDisasterRecoveryPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal + { + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + bool? IsReplicateAutomaticBackup { get; set; } + /// + /// Indicates the cross-region disaster recovery (DR) type of the standby Autonomous Database Serverless instance. Autonomous + /// Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or + /// switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType RemoteDisasterRecoveryType { get; set; } + /// The source of the database. + string Source { get; set; } + /// + /// The Azure ID of the source Autonomous Database that will be used to create a new peer database for the DR association. + /// + string SourceId { get; set; } + /// The name of the region where source Autonomous Database exists. + string SourceLocation { get; set; } + /// The source database ocid + string SourceOcid { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.json.cs new file mode 100644 index 000000000000..4e1552e455bb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseCrossRegionDisasterRecoveryProperties.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database Cross Region Disaster Recovery resource model. + public partial class AutonomousDatabaseCrossRegionDisasterRecoveryProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseCrossRegionDisasterRecoveryProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(json); + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)Source;} + {_sourceId = If( json?.PropertyT("sourceId"), out var __jsonSourceId) ? (string)__jsonSourceId : (string)SourceId;} + {_sourceLocation = If( json?.PropertyT("sourceLocation"), out var __jsonSourceLocation) ? (string)__jsonSourceLocation : (string)SourceLocation;} + {_sourceOcid = If( json?.PropertyT("sourceOcid"), out var __jsonSourceOcid) ? (string)__jsonSourceOcid : (string)SourceOcid;} + {_remoteDisasterRecoveryType = If( json?.PropertyT("remoteDisasterRecoveryType"), out var __jsonRemoteDisasterRecoveryType) ? (string)__jsonRemoteDisasterRecoveryType : (string)RemoteDisasterRecoveryType;} + {_isReplicateAutomaticBackup = If( json?.PropertyT("isReplicateAutomaticBackups"), out var __jsonIsReplicateAutomaticBackups) ? (bool?)__jsonIsReplicateAutomaticBackups : IsReplicateAutomaticBackup;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCrossRegionDisasterRecoveryProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseCrossRegionDisasterRecoveryProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __autonomousDatabaseBaseProperties?.ToJson(container, serializationMode); + AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); + AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); + AddIf( null != (((object)this._sourceLocation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sourceLocation.ToString()) : null, "sourceLocation" ,container.Add ); + AddIf( null != (((object)this._sourceOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sourceOcid.ToString()) : null, "sourceOcid" ,container.Add ); + AddIf( null != (((object)this._remoteDisasterRecoveryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._remoteDisasterRecoveryType.ToString()) : null, "remoteDisasterRecoveryType" ,container.Add ); + AddIf( null != this._isReplicateAutomaticBackup ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isReplicateAutomaticBackup) : null, "isReplicateAutomaticBackups" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.PowerShell.cs new file mode 100644 index 000000000000..67878df9f463 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.PowerShell.cs @@ -0,0 +1,1077 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database From Backup Timestamp resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseFromBackupTimestampPropertiesTypeConverter))] + public partial class AutonomousDatabaseFromBackupTimestampProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseFromBackupTimestampProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("CloneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).CloneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType) content.GetValueForProperty("CloneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).CloneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType.CreateFrom); + } + if (content.Contains("Timestamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Timestamp = (global::System.DateTime?) content.GetValueForProperty("Timestamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Timestamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UseLatestAvailableBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).UseLatestAvailableBackupTimeStamp = (bool?) content.GetValueForProperty("UseLatestAvailableBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).UseLatestAvailableBackupTimeStamp, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseFromBackupTimestampProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("SourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).SourceId = (string) content.GetValueForProperty("SourceId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).SourceId, global::System.Convert.ToString); + } + if (content.Contains("CloneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).CloneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType) content.GetValueForProperty("CloneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).CloneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType.CreateFrom); + } + if (content.Contains("Timestamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Timestamp = (global::System.DateTime?) content.GetValueForProperty("Timestamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).Timestamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("UseLatestAvailableBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).UseLatestAvailableBackupTimeStamp = (bool?) content.GetValueForProperty("UseLatestAvailableBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal)this).UseLatestAvailableBackupTimeStamp, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseFromBackupTimestampProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseFromBackupTimestampProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database From Backup Timestamp resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseFromBackupTimestampPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseFromBackupTimestampProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.TypeConverter.cs new file mode 100644 index 000000000000..8fcad9178f59 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseFromBackupTimestampPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseFromBackupTimestampProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseFromBackupTimestampProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseFromBackupTimestampProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.cs new file mode 100644 index 000000000000..7149dfc1d183 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.cs @@ -0,0 +1,834 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database From Backup Timestamp resource model. + public partial class AutonomousDatabaseFromBackupTimestampProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; } + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType _cloneType; + + /// The Autonomous Database clone type. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType CloneType { get => this._cloneType; set => this._cloneType = value; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel)""); } + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; } + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value ?? null /* model class */; } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType = value ; } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType)""); } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; } + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState)""); } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value ?? null /* model class */; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint = value; } + + /// Internal Acessors for ProvisionableCpu + int[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState = value; } + + /// Internal Acessors for RemoteDisasterRecoveryConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeDisasterRecoveryRoleChanged + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb = value; } + + /// Internal Acessors for Source + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampPropertiesInternal.Source { get => this._source; set { {_source = value;} } } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; } + + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PeerDbId1 { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1 = value ?? null; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel = value ?? null; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int[] ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; } + + /// Indicates remote disaster recovery configuration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = value ?? default(bool); } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = value ?? default(bool); } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = value ?? default(global::System.DateTime); } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); } + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value ?? null /* model class */; } + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value ?? null /* model class */; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; } + + /// Backing field for property. + private string _source= @"BackupFromTimestamp"; + + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Source { get => this._source; } + + /// Backing field for property. + private string _sourceId; + + /// + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SourceId { get => this._sourceId; set => this._sourceId = value; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; } + + /// Backing field for property. + private global::System.DateTime? _timestamp; + + /// + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? Timestamp { get => this._timestamp; set => this._timestamp = value; } + + /// Backing field for property. + private bool? _useLatestAvailableBackupTimeStamp; + + /// Clone from latest available backup timestamp. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? UseLatestAvailableBackupTimeStamp { get => this._useLatestAvailableBackupTimeStamp; set => this._useLatestAvailableBackupTimeStamp = value; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId = value ?? null; } + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP = value ?? null /* arrayOf */; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseFromBackupTimestampProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + } + } + /// Autonomous Database From Backup Timestamp resource model. + public partial interface IAutonomousDatabaseFromBackupTimestampProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties + { + /// The Autonomous Database clone type. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Autonomous Database clone type.", + SerializedName = @"cloneType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType CloneType { get; set; } + /// The source of the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"The source of the database.", + SerializedName = @"source", + PossibleTypes = new [] { typeof(string) })] + string Source { get; } + /// + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the source Autonomous Database that you will clone to create a new Autonomous Database.", + SerializedName = @"sourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceId { get; set; } + /// + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past.", + SerializedName = @"timestamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Timestamp { get; set; } + /// Clone from latest available backup timestamp. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Clone from latest available backup timestamp.", + SerializedName = @"useLatestAvailableBackupTimeStamp", + PossibleTypes = new [] { typeof(bool) })] + bool? UseLatestAvailableBackupTimeStamp { get; set; } + + } + /// Autonomous Database From Backup Timestamp resource model. + internal partial interface IAutonomousDatabaseFromBackupTimestampPropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal + { + /// The Autonomous Database clone type. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType CloneType { get; set; } + /// The source of the database. + string Source { get; set; } + /// + /// The ID of the source Autonomous Database that you will clone to create a new Autonomous Database. + /// + string SourceId { get; set; } + /// + /// The timestamp specified for the point-in-time clone of the source Autonomous Database. The timestamp must be in the past. + /// + global::System.DateTime? Timestamp { get; set; } + /// Clone from latest available backup timestamp. + bool? UseLatestAvailableBackupTimeStamp { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.json.cs new file mode 100644 index 000000000000..d0a136a0cdd1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseFromBackupTimestampProperties.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database From Backup Timestamp resource model. + public partial class AutonomousDatabaseFromBackupTimestampProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseFromBackupTimestampProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(json); + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)Source;} + {_sourceId = If( json?.PropertyT("sourceId"), out var __jsonSourceId) ? (string)__jsonSourceId : (string)SourceId;} + {_cloneType = If( json?.PropertyT("cloneType"), out var __jsonCloneType) ? (string)__jsonCloneType : (string)CloneType;} + {_timestamp = If( json?.PropertyT("timestamp"), out var __jsonTimestamp) ? global::System.DateTime.TryParse((string)__jsonTimestamp, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimestampValue) ? __jsonTimestampValue : Timestamp : Timestamp;} + {_useLatestAvailableBackupTimeStamp = If( json?.PropertyT("useLatestAvailableBackupTimeStamp"), out var __jsonUseLatestAvailableBackupTimeStamp) ? (bool?)__jsonUseLatestAvailableBackupTimeStamp : UseLatestAvailableBackupTimeStamp;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseFromBackupTimestampProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseFromBackupTimestampProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __autonomousDatabaseBaseProperties?.ToJson(container, serializationMode); + AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); + AddIf( null != (((object)this._sourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sourceId.ToString()) : null, "sourceId" ,container.Add ); + AddIf( null != (((object)this._cloneType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloneType.ToString()) : null, "cloneType" ,container.Add ); + AddIf( null != this._timestamp ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timestamp?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timestamp" ,container.Add ); + AddIf( null != this._useLatestAvailableBackupTimeStamp ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._useLatestAvailableBackupTimeStamp) : null, "useLatestAvailableBackupTimeStamp" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.PowerShell.cs new file mode 100644 index 000000000000..ce2b77b7cdd3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a AutonomousDatabase list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseListResultTypeConverter))] + public partial class AutonomousDatabaseListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a AutonomousDatabase list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseListResultTypeConverter))] + public partial interface IAutonomousDatabaseListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.TypeConverter.cs new file mode 100644 index 000000000000..832e32cd1ada --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.cs new file mode 100644 index 000000000000..f07b7a5a9ff6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabase list operation. + public partial class AutonomousDatabaseListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase[] _value; + + /// The AutonomousDatabase items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AutonomousDatabaseListResult() + { + + } + } + /// The response of a AutonomousDatabase list operation. + public partial interface IAutonomousDatabaseListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabase items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AutonomousDatabase items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase[] Value { get; set; } + + } + /// The response of a AutonomousDatabase list operation. + internal partial interface IAutonomousDatabaseListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabase items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.json.cs new file mode 100644 index 000000000000..842b3ddc7be4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabase list operation. + public partial class AutonomousDatabaseListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.PowerShell.cs new file mode 100644 index 000000000000..1390319f9327 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.PowerShell.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDatabaseNationalCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetTypeConverter))] + public partial class AutonomousDatabaseNationalCharacterSet + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseNationalCharacterSet(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseNationalCharacterSet(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseNationalCharacterSet(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseNationalCharacterSet(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDatabaseNationalCharacterSets resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetTypeConverter))] + public partial interface IAutonomousDatabaseNationalCharacterSet + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.TypeConverter.cs new file mode 100644 index 000000000000..696a4406cdba --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseNationalCharacterSetTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseNationalCharacterSet.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSet.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSet.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.cs new file mode 100644 index 000000000000..a15b8c8f89b9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSets resource definition + public partial class AutonomousDatabaseNationalCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)Property).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)Property).CharacterSet = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public AutonomousDatabaseNationalCharacterSet() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// AutonomousDatabaseNationalCharacterSets resource definition + public partial interface IAutonomousDatabaseNationalCharacterSet : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Autonomous Database supported national character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + + } + /// AutonomousDatabaseNationalCharacterSets resource definition + internal partial interface IAutonomousDatabaseNationalCharacterSetInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The Oracle Autonomous Database supported national character sets. + string CharacterSet { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.json.cs new file mode 100644 index 000000000000..aff6c0b76f3c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSet.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSets resource definition + public partial class AutonomousDatabaseNationalCharacterSet + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseNationalCharacterSet(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseNationalCharacterSet(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.PowerShell.cs new file mode 100644 index 000000000000..32e108205219 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.PowerShell.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetListResultTypeConverter))] + public partial class AutonomousDatabaseNationalCharacterSetListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseNationalCharacterSetListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseNationalCharacterSetListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseNationalCharacterSetListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseNationalCharacterSetListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetListResultTypeConverter))] + public partial interface IAutonomousDatabaseNationalCharacterSetListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.TypeConverter.cs new file mode 100644 index 000000000000..a0976e649bdf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseNationalCharacterSetListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseNationalCharacterSetListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.cs new file mode 100644 index 000000000000..1e57ab3be9f7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + public partial class AutonomousDatabaseNationalCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet[] _value; + + /// The AutonomousDatabaseNationalCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet[] Value { get => this._value; set => this._value = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseNationalCharacterSetListResult() + { + + } + } + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + public partial interface IAutonomousDatabaseNationalCharacterSetListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDatabaseNationalCharacterSet items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AutonomousDatabaseNationalCharacterSet items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet[] Value { get; set; } + + } + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + internal partial interface IAutonomousDatabaseNationalCharacterSetListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDatabaseNationalCharacterSet items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.json.cs new file mode 100644 index 000000000000..b1f1acb9fcde --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetListResult.json.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDatabaseNationalCharacterSet list operation. + public partial class AutonomousDatabaseNationalCharacterSetListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseNationalCharacterSetListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSet.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseNationalCharacterSetListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.PowerShell.cs new file mode 100644 index 000000000000..62f748644ad1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.PowerShell.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDatabaseNationalCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter))] + public partial class AutonomousDatabaseNationalCharacterSetProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseNationalCharacterSetProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseNationalCharacterSetProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetPropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseNationalCharacterSetProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseNationalCharacterSetProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDatabaseNationalCharacterSet resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter))] + public partial interface IAutonomousDatabaseNationalCharacterSetProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.TypeConverter.cs new file mode 100644 index 000000000000..f4e3b23bac6c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseNationalCharacterSetPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseNationalCharacterSetProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseNationalCharacterSetProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.cs new file mode 100644 index 000000000000..aa025176e749 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSet resource model + public partial class AutonomousDatabaseNationalCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetPropertiesInternal + { + + /// Backing field for property. + private string _characterSet; + + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CharacterSet { get => this._characterSet; set => this._characterSet = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseNationalCharacterSetProperties() + { + + } + } + /// AutonomousDatabaseNationalCharacterSet resource model + public partial interface IAutonomousDatabaseNationalCharacterSetProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The Oracle Autonomous Database supported national character sets. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Oracle Autonomous Database supported national character sets.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + string CharacterSet { get; set; } + + } + /// AutonomousDatabaseNationalCharacterSet resource model + internal partial interface IAutonomousDatabaseNationalCharacterSetPropertiesInternal + + { + /// The Oracle Autonomous Database supported national character sets. + string CharacterSet { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.json.cs new file mode 100644 index 000000000000..fac8ac5dc005 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseNationalCharacterSetProperties.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDatabaseNationalCharacterSet resource model + public partial class AutonomousDatabaseNationalCharacterSetProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseNationalCharacterSetProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_characterSet = If( json?.PropertyT("characterSet"), out var __jsonCharacterSet) ? (string)__jsonCharacterSet : (string)CharacterSet;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseNationalCharacterSetProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._characterSet)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._characterSet.ToString()) : null, "characterSet" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.PowerShell.cs new file mode 100644 index 000000000000..0dc4ffb71108 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.PowerShell.cs @@ -0,0 +1,1034 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasePropertiesTypeConverter))] + public partial class AutonomousDatabaseProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalStandbyDbLagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond = (int?) content.GetValueForProperty("LocalStandbyDbLagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LocalStandbyDbLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LocalStandbyDbLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LocalStandbyDbLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail = (string) content.GetValueForProperty("LocalStandbyDbLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("LocalStandbyDbTimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("LocalStandbyDbTimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDbTimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("ApexDetailApexVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion = (string) content.GetValueForProperty("ApexDetailApexVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailApexVersion, global::System.Convert.ToString); + } + if (content.Contains("ApexDetailOrdsVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion = (string) content.GetValueForProperty("ApexDetailOrdsVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetailOrdsVersion, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringAllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("ConnectionStringAllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringAllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionStringDedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated = (string) content.GetValueForProperty("ConnectionStringDedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringDedicated, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh = (string) content.GetValueForProperty("ConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow = (string) content.GetValueForProperty("ConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium = (string) content.GetValueForProperty("ConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("ConnectionStringProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("ConnectionStringProfile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionStringProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("ConnectionUrlApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl = (string) content.GetValueForProperty("ConnectionUrlApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlApexUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlDatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl = (string) content.GetValueForProperty("ConnectionUrlDatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlDatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlGraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl = (string) content.GetValueForProperty("ConnectionUrlGraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlGraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl = (string) content.GetValueForProperty("ConnectionUrlMachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlMongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl = (string) content.GetValueForProperty("ConnectionUrlMongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlMongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlOrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl = (string) content.GetValueForProperty("ConnectionUrlOrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlOrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("ConnectionUrlSqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl = (string) content.GetValueForProperty("ConnectionUrlSqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrlSqlDevWebUrl, global::System.Convert.ToString); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + if (content.Contains("RemoteDisasterRecoveryConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) content.GetValueForProperty("RemoteDisasterRecoveryConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).RemoteDisasterRecoveryConfiguration, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("LocalStandbyDb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary) content.GetValueForProperty("LocalStandbyDb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalStandbyDb, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseStandbySummaryTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ApexDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType) content.GetValueForProperty("ApexDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ApexDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ApexDetailsTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType) content.GetValueForProperty("ConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("ConnectionUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType) content.GetValueForProperty("ConnectionUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ConnectionUrl, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ConnectionUrlTypeTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("DataBaseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) content.GetValueForProperty("DataBaseType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataBaseType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType.CreateFrom); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("CharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet = (string) content.GetValueForProperty("CharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CharacterSet, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion = (string) content.GetValueForProperty("DbVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbVersion, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId = (string[]) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("PeerDbId1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1 = (string) content.GetValueForProperty("PeerDbId1",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PeerDbId1, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsRemoteDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled = (bool?) content.GetValueForProperty("IsRemoteDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsRemoteDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalDisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("LocalDisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalDisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged = (global::System.DateTime?) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDisasterRecoveryRoleChanged, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FailedDataRecoveryInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond = (int?) content.GetValueForProperty("FailedDataRecoveryInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).FailedDataRecoveryInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPreviewVersionWithServiceTermsAccepted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted = (bool?) content.GetValueForProperty("IsPreviewVersionWithServiceTermsAccepted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreviewVersionWithServiceTermsAccepted, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("NcharacterSet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet = (string) content.GetValueForProperty("NcharacterSet",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NcharacterSet, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("PrivateEndpointIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP = (string) content.GetValueForProperty("PrivateEndpointIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointIP, global::System.Convert.ToString); + } + if (content.Contains("PrivateEndpointLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel = (string) content.GetValueForProperty("PrivateEndpointLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpointLabel, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceBegin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceBegin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceBegin, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeMaintenanceEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ActualUsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb = (double?) content.GetValueForProperty("ActualUsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ActualUsedDataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AllocatedStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb = (double?) content.GetValueForProperty("AllocatedStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AllocatedStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableUpgradeVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion = (string[]) content.GetValueForProperty("AvailableUpgradeVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AvailableUpgradeVersion, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataSafeStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType?) content.GetValueForProperty("DataSafeStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DataSafeStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("AutonomousDatabaseId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId = (string) content.GetValueForProperty("AutonomousDatabaseId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).AutonomousDatabaseId, global::System.Convert.ToString); + } + if (content.Contains("InMemoryAreaInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb = (int?) content.GetValueForProperty("InMemoryAreaInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).InMemoryAreaInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NextLongTermBackupTimeStamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp = (global::System.DateTime?) content.GetValueForProperty("NextLongTermBackupTimeStamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).NextLongTermBackupTimeStamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsPreview")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemoryPerOracleComputeUnitInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb = (int?) content.GetValueForProperty("MemoryPerOracleComputeUnitInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).MemoryPerOracleComputeUnitInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("OperationsInsightsStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType?) content.GetValueForProperty("OperationsInsightsStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).OperationsInsightsStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("PrivateEndpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint = (string) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).PrivateEndpoint, global::System.Convert.ToString); + } + if (content.Contains("ProvisionableCpu")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu = (int[]) content.GetValueForProperty("ProvisionableCpu",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ProvisionableCpu, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("ServiceConsoleUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl = (string) content.GetValueForProperty("ServiceConsoleUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).ServiceConsoleUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlWebDeveloperUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl = (string) content.GetValueForProperty("SqlWebDeveloperUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SqlWebDeveloperUrl, global::System.Convert.ToString); + } + if (content.Contains("SupportedRegionsToCloneTo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo = (string[]) content.GetValueForProperty("SupportedRegionsToCloneTo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).SupportedRegionsToCloneTo, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDeletionOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeDeletionOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeDeletionOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("TimeLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled = (string) content.GetValueForProperty("TimeLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeLocalDataGuardEnabled, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastFailover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover = (string) content.GetValueForProperty("TimeOfLastFailover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastFailover, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefresh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh = (string) content.GetValueForProperty("TimeOfLastRefresh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefresh, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastRefreshPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint = (string) content.GetValueForProperty("TimeOfLastRefreshPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastRefreshPoint, global::System.Convert.ToString); + } + if (content.Contains("TimeOfLastSwitchover")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover = (string) content.GetValueForProperty("TimeOfLastSwitchover",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeOfLastSwitchover, global::System.Convert.ToString); + } + if (content.Contains("TimeReclamationOfFreeAutonomousDatabase")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase = (string) content.GetValueForProperty("TimeReclamationOfFreeAutonomousDatabase",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).TimeReclamationOfFreeAutonomousDatabase, global::System.Convert.ToString); + } + if (content.Contains("UsedDataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb = (int?) content.GetValueForProperty("UsedDataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("UsedDataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb = (int?) content.GetValueForProperty("UsedDataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).UsedDataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.TypeConverter.cs new file mode 100644 index 000000000000..33bf11f7da3f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.cs new file mode 100644 index 000000000000..b650a0a69baa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.cs @@ -0,0 +1,732 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabasePropertiesInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(); + + /// + /// The current amount of storage in use for user and system data, in terabytes (TB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; } + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AdminPassword = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllConnectionStringMedium = value ?? null; } + + /// + /// The amount of storage currently allocated for the database tables and billed for, rounded up. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public double? AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; } + + /// Information about Oracle APEX Application Development. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; } + + /// The Oracle APEX Application Development version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailApexVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailApexVersion = value ?? null; } + + /// The Oracle REST Data Services (ORDS) version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ApexDetailOrdsVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetailOrdsVersion = value ?? null; } + + /// Autonomous Database ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string AutonomousDatabaseId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousDatabaseId = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AutonomousMaintenanceScheduleType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); } + + /// + /// List of Oracle Database versions available for a database upgrade. If there are no version upgrades available, this list + /// is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The character set for the autonomous database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string CharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CharacterSet = value ?? null; } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeCount = value ?? default(float); } + + /// The compute model of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ComputeModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel)""); } + + /// The connection string used to connect to the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; } + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType ConnectionStringAllConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringAllConnectionString = value ?? null /* model class */; } + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringDedicated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringDedicated = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringHigh = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringLow = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringMedium = value ?? null; } + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] ConnectionStringProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionStringProfile = value ?? null /* arrayOf */; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; } + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlApexUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlApexUrl = value ?? null; } + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlDatabaseTransformsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlDatabaseTransformsUrl = value ?? null; } + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlGraphStudioUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlGraphStudioUrl = value ?? null; } + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMachineLearningNotebookUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMachineLearningNotebookUrl = value ?? null; } + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlMongoDbUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlMongoDbUrl = value ?? null; } + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlOrdsUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlOrdsUrl = value ?? null; } + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ConnectionUrlSqlDevWebUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrlSqlDevWebUrl = value ?? null; } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).CustomerContact = value ?? null /* arrayOf */; } + + /// Database type to be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataBaseType = value ; } + + /// Status of the Data Safe registration for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DatabaseEdition = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// A valid Oracle Database version for Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DbVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbVersion = value ?? null; } + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DbWorkload = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType)""); } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DisplayName = value ?? null; } + + /// Indicates the number of seconds of data loss for a Data Guard failover. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; } + + /// The area assigned to In-Memory tables in Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsMtlsConnectionRequired = value ?? default(bool); } + + /// Indicates if the Autonomous Database version is a preview version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsPreviewVersionWithServiceTermsAccepted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreviewVersionWithServiceTermsAccepted = value ?? default(bool); } + + /// Indicates whether the Autonomous Database has Cross Region Data Guard enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; } + + /// Local Autonomous Disaster Recovery standby database details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LocalStandbyDbLagTimeInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLagTimeInSecond = value ?? default(int); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleDetail = value ?? null; } + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LocalStandbyDbLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbLifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState)""); } + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDataGuardRoleChanged = value ?? null; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string LocalStandbyDbTimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDbTimeDisasterRecoveryRoleChanged = value ?? null; } + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupSchedule = value ?? null /* model class */; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// The amount of memory (in GBs) enabled per ECPU or OCPU. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; } + + /// Internal Acessors for ActualUsedDataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ActualUsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ActualUsedDataStorageSizeInTb = value; } + + /// Internal Acessors for AllocatedStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AllocatedStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AllocatedStorageSizeInTb = value; } + + /// Internal Acessors for ApexDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IApexDetailsType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ApexDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ApexDetail = value; } + + /// Internal Acessors for AvailableUpgradeVersion + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.AvailableUpgradeVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).AvailableUpgradeVersion = value; } + + /// Internal Acessors for ConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionString { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionString = value; } + + /// Internal Acessors for ConnectionUrl + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ConnectionUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ConnectionUrl = value; } + + /// Internal Acessors for DataSafeStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.DataSafeStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).DataSafeStatus = value; } + + /// Internal Acessors for FailedDataRecoveryInSecond + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.FailedDataRecoveryInSecond { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).FailedDataRecoveryInSecond = value; } + + /// Internal Acessors for InMemoryAreaInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.InMemoryAreaInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).InMemoryAreaInGb = value; } + + /// Internal Acessors for IsPreview + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsPreview { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsPreview = value; } + + /// Internal Acessors for IsRemoteDataGuardEnabled + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.IsRemoteDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).IsRemoteDataGuardEnabled = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LifecycleState = value; } + + /// Internal Acessors for LocalDisasterRecoveryType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalDisasterRecoveryType = value; } + + /// Internal Acessors for LocalStandbyDb + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.LocalStandbyDb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).LocalStandbyDb = value; } + + /// Internal Acessors for MemoryPerOracleComputeUnitInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.MemoryPerOracleComputeUnitInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).MemoryPerOracleComputeUnitInGb = value; } + + /// Internal Acessors for NextLongTermBackupTimeStamp + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid = value; } + + /// Internal Acessors for OperationsInsightsStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus = value; } + + /// Internal Acessors for PeerDbId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId = value; } + + /// Internal Acessors for PrivateEndpoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint = value; } + + /// Internal Acessors for ProvisionableCpu + int[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState = value; } + + /// Internal Acessors for RemoteDisasterRecoveryConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration = value; } + + /// Internal Acessors for ServiceConsoleUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl = value; } + + /// Internal Acessors for SqlWebDeveloperUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl = value; } + + /// Internal Acessors for SupportedRegionsToCloneTo + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated = value; } + + /// Internal Acessors for TimeDataGuardRoleChanged + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged = value; } + + /// Internal Acessors for TimeDeletionOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for TimeDisasterRecoveryRoleChanged + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged = value; } + + /// Internal Acessors for TimeLocalDataGuardEnabled + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled = value; } + + /// Internal Acessors for TimeMaintenanceBegin + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin = value; } + + /// Internal Acessors for TimeMaintenanceEnd + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd = value; } + + /// Internal Acessors for TimeOfLastFailover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover = value; } + + /// Internal Acessors for TimeOfLastRefresh + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh = value; } + + /// Internal Acessors for TimeOfLastRefreshPoint + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint = value; } + + /// Internal Acessors for TimeOfLastSwitchover + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover = value; } + + /// Internal Acessors for TimeReclamationOfFreeAutonomousDatabase + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase = value; } + + /// Internal Acessors for UsedDataStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb = value; } + + /// Internal Acessors for UsedDataStorageSizeInTb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal.UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb = value; } + + /// The character set for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string NcharacterSet { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NcharacterSet = value ?? null; } + + /// The date and time when the next long-term backup would be created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? NextLongTermBackupTimeStamp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).NextLongTermBackupTimeStamp; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OciUrl; } + + /// Database ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Ocid; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OpenMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); } + + /// Status of Operations Insights for this Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType? OperationsInsightsStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).OperationsInsightsStatus; } + + /// + /// The list of Azure resource IDs of standby databases located in Autonomous Data Guard remote regions that are associated + /// with the source database. Note that for Autonomous Database Serverless instances, standby databases located in the same + /// region as the source primary database do not have Azure IDs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PeerDbId1 { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PeerDbId1 = value ?? null; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PermissionLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); } + + /// The private endpoint for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpoint; } + + /// The private endpoint Ip address for the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointIP = value ?? null; } + + /// The resource's private endpoint label. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string PrivateEndpointLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).PrivateEndpointLabel = value ?? null; } + + /// An array of CPU values that an Autonomous Database can be scaled to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int[] ProvisionableCpu { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisionableCpu; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ProvisioningState; } + + /// Indicates remote disaster recovery configuration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails RemoteDisasterRecoveryConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfiguration; } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? RemoteDisasterRecoveryConfigurationDisasterRecoveryType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationDisasterRecoveryType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsReplicateAutomaticBackup = value ?? default(bool); } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public bool? RemoteDisasterRecoveryConfigurationIsSnapshotStandby { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationIsSnapshotStandby = value ?? default(bool); } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).RemoteDisasterRecoveryConfigurationTimeSnapshotStandbyEnabledTill = value ?? default(global::System.DateTime); } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).Role = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); } + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperation = value ?? null /* model class */; } + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationDayOfWeek = value ?? null /* model class */; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ScheduledOperationScheduledStopTime = value ?? null; } + + /// The URL of the Service Console for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string ServiceConsoleUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).ServiceConsoleUrl; } + + /// The SQL Web Developer URL for the Oracle Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SqlWebDeveloperUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SqlWebDeveloperUrl; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SubnetId = value ?? null; } + + /// + /// The list of regions that support the creation of an Autonomous Database clone or an Autonomous Data Guard standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] SupportedRegionsToCloneTo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).SupportedRegionsToCloneTo; } + + /// The date and time that the database was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeCreated; } + + /// + /// The date and time the Autonomous Data Guard role was switched for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDataGuardRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDataGuardRoleChanged; } + + /// + /// The date and time the Always Free database will be automatically deleted because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeDeletionOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDeletionOfFreeAutonomousDatabase; } + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeDisasterRecoveryRoleChanged { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeDisasterRecoveryRoleChanged; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeLocalDataGuardEnabled; } + + /// The date and time when maintenance will begin. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceBegin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceBegin; } + + /// The date and time when maintenance will end. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? TimeMaintenanceEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeMaintenanceEnd; } + + /// The timestamp of the last failover operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastFailover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastFailover; } + + /// The date and time when last refresh happened. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefresh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefresh; } + + /// The refresh point timestamp (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastRefreshPoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastRefreshPoint; } + + /// The timestamp of the last switchover operation for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeOfLastSwitchover { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeOfLastSwitchover; } + + /// + /// The date and time the Always Free database will be stopped because of inactivity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string TimeReclamationOfFreeAutonomousDatabase { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).TimeReclamationOfFreeAutonomousDatabase; } + + /// The storage space consumed by Autonomous Database in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInGb; } + + /// The amount of storage that has been used, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public int? UsedDataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).UsedDataStorageSizeInTb; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).VnetId = value ?? null; } + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string[] WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal)__autonomousDatabaseBaseProperties).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabaseProperties() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + await eventListener.AssertObjectIsValid(nameof(__autonomousDatabaseBaseProperties), __autonomousDatabaseBaseProperties); + } + } + /// Autonomous Database resource model. + public partial interface IAutonomousDatabaseProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBaseProperties + { + + } + /// Autonomous Database resource model. + internal partial interface IAutonomousDatabasePropertiesInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBasePropertiesInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.json.cs new file mode 100644 index 000000000000..afd97383dfdc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database resource model. + public partial class AutonomousDatabaseProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __autonomousDatabaseBaseProperties = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBaseProperties(json); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __autonomousDatabaseBaseProperties?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.PowerShell.cs new file mode 100644 index 000000000000..ff7bda40d3f0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Disaster Recovery standby database details. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseStandbySummaryTypeConverter))] + public partial class AutonomousDatabaseStandbySummary + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseStandbySummary(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond = (int?) content.GetValueForProperty("LagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseStandbySummary(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("LagTimeInSecond")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond = (int?) content.GetValueForProperty("LagTimeInSecond",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LagTimeInSecond, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeDataGuardRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged = (string) content.GetValueForProperty("TimeDataGuardRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDataGuardRoleChanged, global::System.Convert.ToString); + } + if (content.Contains("TimeDisasterRecoveryRoleChanged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged = (string) content.GetValueForProperty("TimeDisasterRecoveryRoleChanged",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal)this).TimeDisasterRecoveryRoleChanged, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseStandbySummary(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseStandbySummary(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Disaster Recovery standby database details. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseStandbySummaryTypeConverter))] + public partial interface IAutonomousDatabaseStandbySummary + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.TypeConverter.cs new file mode 100644 index 000000000000..22d914273502 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseStandbySummaryTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseStandbySummary.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseStandbySummary.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseStandbySummary.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.cs new file mode 100644 index 000000000000..c324548f57c9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Disaster Recovery standby database details. + public partial class AutonomousDatabaseStandbySummary : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummaryInternal + { + + /// Backing field for property. + private int? _lagTimeInSecond; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? LagTimeInSecond { get => this._lagTimeInSecond; set => this._lagTimeInSecond = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; set => this._lifecycleDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? _lifecycleState; + + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Backing field for property. + private string _timeDataGuardRoleChanged; + + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeDataGuardRoleChanged { get => this._timeDataGuardRoleChanged; set => this._timeDataGuardRoleChanged = value; } + + /// Backing field for property. + private string _timeDisasterRecoveryRoleChanged; + + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeDisasterRecoveryRoleChanged { get => this._timeDisasterRecoveryRoleChanged; set => this._timeDisasterRecoveryRoleChanged = value; } + + /// Creates an new instance. + public AutonomousDatabaseStandbySummary() + { + + } + } + /// Autonomous Disaster Recovery standby database details. + public partial interface IAutonomousDatabaseStandbySummary : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"lagTimeInSeconds", + PossibleTypes = new [] { typeof(int) })] + int? LagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of the Autonomous Database.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database.", + SerializedName = @"timeDataGuardRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date and time the Disaster Recovery role was switched for the standby Autonomous Database.", + SerializedName = @"timeDisasterRecoveryRoleChanged", + PossibleTypes = new [] { typeof(string) })] + string TimeDisasterRecoveryRoleChanged { get; set; } + + } + /// Autonomous Disaster Recovery standby database details. + internal partial interface IAutonomousDatabaseStandbySummaryInternal + + { + /// + /// 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. + /// + int? LagTimeInSecond { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// The current state of the Autonomous Database. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState? LifecycleState { get; set; } + /// + /// The date and time the Autonomous Data Guard role was switched for the standby Autonomous Database. + /// + string TimeDataGuardRoleChanged { get; set; } + /// + /// The date and time the Disaster Recovery role was switched for the standby Autonomous Database. + /// + string TimeDisasterRecoveryRoleChanged { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.json.cs new file mode 100644 index 000000000000..4550cdb989af --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseStandbySummary.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Disaster Recovery standby database details. + public partial class AutonomousDatabaseStandbySummary + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseStandbySummary(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_lagTimeInSecond = If( json?.PropertyT("lagTimeInSeconds"), out var __jsonLagTimeInSeconds) ? (int?)__jsonLagTimeInSeconds : LagTimeInSecond;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_timeDataGuardRoleChanged = If( json?.PropertyT("timeDataGuardRoleChanged"), out var __jsonTimeDataGuardRoleChanged) ? (string)__jsonTimeDataGuardRoleChanged : (string)TimeDataGuardRoleChanged;} + {_timeDisasterRecoveryRoleChanged = If( json?.PropertyT("timeDisasterRecoveryRoleChanged"), out var __jsonTimeDisasterRecoveryRoleChanged) ? (string)__jsonTimeDisasterRecoveryRoleChanged : (string)TimeDisasterRecoveryRoleChanged;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseStandbySummary FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseStandbySummary(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._lagTimeInSecond ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._lagTimeInSecond) : null, "lagTimeInSeconds" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + AddIf( null != (((object)this._timeDataGuardRoleChanged)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeDataGuardRoleChanged.ToString()) : null, "timeDataGuardRoleChanged" ,container.Add ); + AddIf( null != (((object)this._timeDisasterRecoveryRoleChanged)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeDisasterRecoveryRoleChanged.ToString()) : null, "timeDisasterRecoveryRoleChanged" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.PowerShell.cs new file mode 100644 index 000000000000..c6d24ead41bf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.PowerShell.cs @@ -0,0 +1,402 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The type used for update operations of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTypeConverter))] + public partial class AutonomousDatabaseUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The type used for update operations of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTypeConverter))] + public partial interface IAutonomousDatabaseUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.TypeConverter.cs new file mode 100644 index 000000000000..396cf90e1d0b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.cs new file mode 100644 index 000000000000..0292379eda83 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.cs @@ -0,0 +1,542 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal + { + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public System.Security.SecureString AdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).AdminPassword = value ?? null; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).AutonomousMaintenanceScheduleType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).AutonomousMaintenanceScheduleType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); } + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? BackupRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).BackupRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).BackupRetentionPeriodInDay = value ?? default(int); } + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public float? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ComputeCount = value ?? default(float); } + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DataStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInGb = value ?? default(int); } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DataStorageSizeInTb = value ?? default(int); } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DatabaseEdition; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DatabaseEdition = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsAutoScalingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingEnabled = value ?? default(bool); } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsAutoScalingForStorageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingForStorageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsAutoScalingForStorageEnabled = value ?? default(bool); } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsLocalDataGuardEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsLocalDataGuardEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsLocalDataGuardEnabled = value ?? default(bool); } + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsMtlsConnectionRequired { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsMtlsConnectionRequired; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).IsMtlsConnectionRequired = value ?? default(bool); } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LocalAdgAutoFailoverMaxDataLossLimit = value ?? default(int); } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleIsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleIsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleRetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupScheduleTimeOfBackup = value ?? default(global::System.DateTime); } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal.LongTermBackupSchedule { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupSchedule; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).LongTermBackupSchedule = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateProperties()); set { {_property = value;} } } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal.ScheduledOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperation; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperation = value; } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationDayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationDayOfWeek = value; } + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).OpenMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).OpenMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PeerDbId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).PeerDbId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).PeerDbId = value ?? null; } + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).PermissionLevel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).PermissionLevel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateProperties()); set => this._property = value; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).Role; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).Role = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).ScheduledOperationScheduledStopTime = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateTags()); set => this._tag = value; } + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] WhitelistedIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).WhitelistedIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)Property).WhitelistedIP = value ?? null /* arrayOf */; } + + /// Creates an new instance. + public AutonomousDatabaseUpdate() + { + + } + } + /// The type used for update operations of the AutonomousDatabase. + public partial interface IAutonomousDatabaseUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags Tag { get; set; } + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + string[] WhitelistedIP { get; set; } + + } + /// The type used for update operations of the AutonomousDatabase. + internal partial interface IAutonomousDatabaseUpdateInternal + + { + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// + /// 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 + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties Property { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags Tag { get; set; } + /// + /// 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'] + /// + string[] WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.json.cs new file mode 100644 index 000000000000..4e2b15925965 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateProperties.FromJson(__jsonProperties) : Property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..3d966ef1d88d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.PowerShell.cs @@ -0,0 +1,388 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The updatable properties of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdatePropertiesTypeConverter))] + public partial class AutonomousDatabaseUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ScheduledOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate) content.GetValueForProperty("ScheduledOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperation, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("LongTermBackupSchedule")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails) content.GetValueForProperty("LongTermBackupSchedule",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupSchedule, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword = (System.Security.SecureString) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AdminPassword, (object ss) => (System.Security.SecureString)ss); + } + if (content.Contains("AutonomousMaintenanceScheduleType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType?) content.GetValueForProperty("AutonomousMaintenanceScheduleType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).AutonomousMaintenanceScheduleType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType.CreateFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount = (float?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ComputeCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb = (int?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb = (int?) content.GetValueForProperty("DataStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DataStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsAutoScalingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled = (bool?) content.GetValueForProperty("IsAutoScalingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsAutoScalingForStorageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled = (bool?) content.GetValueForProperty("IsAutoScalingForStorageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsAutoScalingForStorageEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("IsLocalDataGuardEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled = (bool?) content.GetValueForProperty("IsLocalDataGuardEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsLocalDataGuardEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMtlsConnectionRequired")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired = (bool?) content.GetValueForProperty("IsMtlsConnectionRequired",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).IsMtlsConnectionRequired, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DatabaseEdition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType?) content.GetValueForProperty("DatabaseEdition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DatabaseEdition, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType.CreateFrom); + } + if (content.Contains("LocalAdgAutoFailoverMaxDataLossLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit = (int?) content.GetValueForProperty("LocalAdgAutoFailoverMaxDataLossLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LocalAdgAutoFailoverMaxDataLossLimit, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OpenMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType?) content.GetValueForProperty("OpenMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).OpenMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType.CreateFrom); + } + if (content.Contains("PermissionLevel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType?) content.GetValueForProperty("PermissionLevel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).PermissionLevel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType.CreateFrom); + } + if (content.Contains("Role")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).Role = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType?) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).Role, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType.CreateFrom); + } + if (content.Contains("BackupRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay = (int?) content.GetValueForProperty("BackupRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).BackupRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("WhitelistedIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP = (string[]) content.GetValueForProperty("WhitelistedIP",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).WhitelistedIP, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LongTermBackupScheduleRetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay = (int?) content.GetValueForProperty("LongTermBackupScheduleRetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScheduledOperationDayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate) content.GetValueForProperty("ScheduledOperationDayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationDayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledOperationScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledOperationScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime = (string) content.GetValueForProperty("ScheduledOperationScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).ScheduledOperationScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleRepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("LongTermBackupScheduleRepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleRepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("LongTermBackupScheduleTimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("LongTermBackupScheduleTimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleTimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LongTermBackupScheduleIsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled = (bool?) content.GetValueForProperty("LongTermBackupScheduleIsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal)this).LongTermBackupScheduleIsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The updatable properties of the AutonomousDatabase. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdatePropertiesTypeConverter))] + public partial interface IAutonomousDatabaseUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..b8bd62ea00ff --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.cs new file mode 100644 index 000000000000..ea632cd2738e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.cs @@ -0,0 +1,590 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal + { + + /// Backing field for property. + private System.Security.SecureString _adminPassword; + + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public System.Security.SecureString AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? _autonomousMaintenanceScheduleType; + + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get => this._autonomousMaintenanceScheduleType; set => this._autonomousMaintenanceScheduleType = value; } + + /// Backing field for property. + private int? _backupRetentionPeriodInDay; + + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? BackupRetentionPeriodInDay { get => this._backupRetentionPeriodInDay; set => this._backupRetentionPeriodInDay = value; } + + /// Backing field for property. + private float? _computeCount; + + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public float? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] _customerContact; + + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private int? _dataStorageSizeInGb; + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DataStorageSizeInGb { get => this._dataStorageSizeInGb; set => this._dataStorageSizeInGb = value; } + + /// Backing field for property. + private int? _dataStorageSizeInTb; + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? _databaseEdition; + + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get => this._databaseEdition; set => this._databaseEdition = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeekName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeekName = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// Backing field for property. + private string _displayName; + + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private bool? _isAutoScalingEnabled; + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsAutoScalingEnabled { get => this._isAutoScalingEnabled; set => this._isAutoScalingEnabled = value; } + + /// Backing field for property. + private bool? _isAutoScalingForStorageEnabled; + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsAutoScalingForStorageEnabled { get => this._isAutoScalingForStorageEnabled; set => this._isAutoScalingForStorageEnabled = value; } + + /// Backing field for property. + private bool? _isLocalDataGuardEnabled; + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsLocalDataGuardEnabled { get => this._isLocalDataGuardEnabled; set => this._isLocalDataGuardEnabled = value; } + + /// Backing field for property. + private bool? _isMtlsConnectionRequired; + + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsMtlsConnectionRequired { get => this._isMtlsConnectionRequired; set => this._isMtlsConnectionRequired = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? _licenseModel; + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private int? _localAdgAutoFailoverMaxDataLossLimit; + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? LocalAdgAutoFailoverMaxDataLossLimit { get => this._localAdgAutoFailoverMaxDataLossLimit; set => this._localAdgAutoFailoverMaxDataLossLimit = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails _longTermBackupSchedule; + + /// Details for the long-term backup schedule. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails()); set => this._longTermBackupSchedule = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? LongTermBackupScheduleIsDisabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).IsDisabled = value ?? default(bool); } + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RepeatCadence = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); } + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? LongTermBackupScheduleRetentionPeriodInDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).RetentionPeriodInDay = value ?? default(int); } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)LongTermBackupSchedule).TimeOfBackup = value ?? default(global::System.DateTime); } + + /// Internal Acessors for LongTermBackupSchedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal.LongTermBackupSchedule { get => (this._longTermBackupSchedule = this._longTermBackupSchedule ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails()); set { {_longTermBackupSchedule = value;} } } + + /// Internal Acessors for ScheduledOperation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal.ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdate()); set { {_scheduledOperation = value;} } } + + /// Internal Acessors for ScheduledOperationDayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdatePropertiesInternal.ScheduledOperationDayOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).DayOfWeek = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? _openMode; + + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get => this._openMode; set => this._openMode = value; } + + /// Backing field for property. + private string _peerDbId; + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PeerDbId { get => this._peerDbId; set => this._peerDbId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? _permissionLevel; + + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get => this._permissionLevel; set => this._permissionLevel = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? _role; + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get => this._role; set => this._role = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate _scheduledOperation; + + /// The list of scheduled operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate ScheduledOperation { get => (this._scheduledOperation = this._scheduledOperation ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdate()); set => this._scheduledOperation = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStartTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStartTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStartTime = value ?? null; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScheduledOperationScheduledStopTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStopTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)ScheduledOperation).ScheduledStopTime = value ?? null; } + + /// Backing field for property. + private string[] _whitelistedIP; + + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] WhitelistedIP { get => this._whitelistedIP; set => this._whitelistedIP = value; } + + /// Creates an new instance. + public AutonomousDatabaseUpdateProperties() + { + + } + } + /// The updatable properties of the AutonomousDatabase. + public partial interface IAutonomousDatabaseUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Admin password. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// Customer Contacts. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledOperationScheduledStopTime { get; set; } + /// + /// 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'] + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + string[] WhitelistedIP { get; set; } + + } + /// The updatable properties of the AutonomousDatabase. + internal partial interface IAutonomousDatabaseUpdatePropertiesInternal + + { + /// Admin password. + System.Security.SecureString AdminPassword { get; set; } + /// The maintenance schedule type of the Autonomous Database Serverless. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType? AutonomousMaintenanceScheduleType { get; set; } + /// Retention period, in days, for long-term backups + int? BackupRetentionPeriodInDay { get; set; } + /// The compute amount (CPUs) available to the database. + float? ComputeCount { get; set; } + /// The number of CPU cores to be made available to the database. + int? CpuCoreCount { get; set; } + /// Customer Contacts. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + int? DataStorageSizeInGb { get; set; } + /// The quantity of data in the database, in terabytes. + int? DataStorageSizeInTb { get; set; } + /// The Oracle Database Edition that applies to the Autonomous databases. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType? DatabaseEdition { get; set; } + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// The user-friendly name for the Autonomous Database. + string DisplayName { get; set; } + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + bool? IsAutoScalingEnabled { get; set; } + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + bool? IsAutoScalingForStorageEnabled { get; set; } + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + bool? IsLocalDataGuardEnabled { get; set; } + /// Specifies if the Autonomous Database requires mTLS connections. + bool? IsMtlsConnectionRequired { get; set; } + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// + /// 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 + /// + int? LocalAdgAutoFailoverMaxDataLossLimit { get; set; } + /// Details for the long-term backup schedule. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails LongTermBackupSchedule { get; set; } + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? LongTermBackupScheduleIsDisabled { get; set; } + /// The frequency of the long-term backup schedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? LongTermBackupScheduleRepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? LongTermBackupScheduleRetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? LongTermBackupScheduleTimeOfBackup { get; set; } + /// Indicates the Autonomous Database mode. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType? OpenMode { get; set; } + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + string PeerDbId { get; set; } + /// The Autonomous Database permission level. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType? PermissionLevel { get; set; } + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType? Role { get; set; } + /// The list of scheduled operations. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate ScheduledOperation { get; set; } + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate ScheduledOperationDayOfWeek { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledOperationScheduledStopTime { get; set; } + /// + /// 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'] + /// + string[] WhitelistedIP { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.json.cs new file mode 100644 index 000000000000..8fc5cc336ffd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateProperties.json.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the AutonomousDatabase. + public partial class AutonomousDatabaseUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_scheduledOperation = If( json?.PropertyT("scheduledOperations"), out var __jsonScheduledOperations) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ScheduledOperationsTypeUpdate.FromJson(__jsonScheduledOperations) : ScheduledOperation;} + {_longTermBackupSchedule = If( json?.PropertyT("longTermBackupSchedule"), out var __jsonLongTermBackupSchedule) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.LongTermBackUpScheduleDetails.FromJson(__jsonLongTermBackupSchedule) : LongTermBackupSchedule;} + {_adminPassword = If( json?.PropertyT("adminPassword"), out var __jsonAdminPassword) ? new System.Net.NetworkCredential("",(string)__jsonAdminPassword).SecurePassword : AdminPassword;} + {_autonomousMaintenanceScheduleType = If( json?.PropertyT("autonomousMaintenanceScheduleType"), out var __jsonAutonomousMaintenanceScheduleType) ? (string)__jsonAutonomousMaintenanceScheduleType : (string)AutonomousMaintenanceScheduleType;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (float?)__jsonComputeCount : ComputeCount;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : CpuCoreCount;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContact.FromJson(__u) )) ))() : null : CustomerContact;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (int?)__jsonDataStorageSizeInTbs : DataStorageSizeInTb;} + {_dataStorageSizeInGb = If( json?.PropertyT("dataStorageSizeInGbs"), out var __jsonDataStorageSizeInGbs) ? (int?)__jsonDataStorageSizeInGbs : DataStorageSizeInGb;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_isAutoScalingEnabled = If( json?.PropertyT("isAutoScalingEnabled"), out var __jsonIsAutoScalingEnabled) ? (bool?)__jsonIsAutoScalingEnabled : IsAutoScalingEnabled;} + {_isAutoScalingForStorageEnabled = If( json?.PropertyT("isAutoScalingForStorageEnabled"), out var __jsonIsAutoScalingForStorageEnabled) ? (bool?)__jsonIsAutoScalingForStorageEnabled : IsAutoScalingForStorageEnabled;} + {_peerDbId = If( json?.PropertyT("peerDbId"), out var __jsonPeerDbId) ? (string)__jsonPeerDbId : (string)PeerDbId;} + {_isLocalDataGuardEnabled = If( json?.PropertyT("isLocalDataGuardEnabled"), out var __jsonIsLocalDataGuardEnabled) ? (bool?)__jsonIsLocalDataGuardEnabled : IsLocalDataGuardEnabled;} + {_isMtlsConnectionRequired = If( json?.PropertyT("isMtlsConnectionRequired"), out var __jsonIsMtlsConnectionRequired) ? (bool?)__jsonIsMtlsConnectionRequired : IsMtlsConnectionRequired;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)LicenseModel;} + {_databaseEdition = If( json?.PropertyT("databaseEdition"), out var __jsonDatabaseEdition) ? (string)__jsonDatabaseEdition : (string)DatabaseEdition;} + {_localAdgAutoFailoverMaxDataLossLimit = If( json?.PropertyT("localAdgAutoFailoverMaxDataLossLimit"), out var __jsonLocalAdgAutoFailoverMaxDataLossLimit) ? (int?)__jsonLocalAdgAutoFailoverMaxDataLossLimit : LocalAdgAutoFailoverMaxDataLossLimit;} + {_openMode = If( json?.PropertyT("openMode"), out var __jsonOpenMode) ? (string)__jsonOpenMode : (string)OpenMode;} + {_permissionLevel = If( json?.PropertyT("permissionLevel"), out var __jsonPermissionLevel) ? (string)__jsonPermissionLevel : (string)PermissionLevel;} + {_role = If( json?.PropertyT("role"), out var __jsonRole) ? (string)__jsonRole : (string)Role;} + {_backupRetentionPeriodInDay = If( json?.PropertyT("backupRetentionPeriodInDays"), out var __jsonBackupRetentionPeriodInDays) ? (int?)__jsonBackupRetentionPeriodInDays : BackupRetentionPeriodInDay;} + {_whitelistedIP = If( json?.PropertyT("whitelistedIps"), out var __jsonWhitelistedIps) ? If( __jsonWhitelistedIps as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : WhitelistedIP;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._scheduledOperation ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._scheduledOperation.ToJson(null,serializationMode) : null, "scheduledOperations" ,container.Add ); + AddIf( null != this._longTermBackupSchedule ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._longTermBackupSchedule.ToJson(null,serializationMode) : null, "longTermBackupSchedule" ,container.Add ); + AddIf( null != (((object)this._adminPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._adminPassword))) : null, "adminPassword" ,container.Add ); + AddIf( null != (((object)this._autonomousMaintenanceScheduleType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._autonomousMaintenanceScheduleType.ToString()) : null, "autonomousMaintenanceScheduleType" ,container.Add ); + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((float)this._computeCount) : null, "computeCount" ,container.Add ); + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + if (null != this._customerContact) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._customerContact ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customerContacts",__w); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dataStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dataStorageSizeInGb) : null, "dataStorageSizeInGbs" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != this._isAutoScalingEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isAutoScalingEnabled) : null, "isAutoScalingEnabled" ,container.Add ); + AddIf( null != this._isAutoScalingForStorageEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isAutoScalingForStorageEnabled) : null, "isAutoScalingForStorageEnabled" ,container.Add ); + AddIf( null != (((object)this._peerDbId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._peerDbId.ToString()) : null, "peerDbId" ,container.Add ); + AddIf( null != this._isLocalDataGuardEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isLocalDataGuardEnabled) : null, "isLocalDataGuardEnabled" ,container.Add ); + AddIf( null != this._isMtlsConnectionRequired ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isMtlsConnectionRequired) : null, "isMtlsConnectionRequired" ,container.Add ); + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + AddIf( null != (((object)this._databaseEdition)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._databaseEdition.ToString()) : null, "databaseEdition" ,container.Add ); + AddIf( null != this._localAdgAutoFailoverMaxDataLossLimit ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._localAdgAutoFailoverMaxDataLossLimit) : null, "localAdgAutoFailoverMaxDataLossLimit" ,container.Add ); + AddIf( null != (((object)this._openMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._openMode.ToString()) : null, "openMode" ,container.Add ); + AddIf( null != (((object)this._permissionLevel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._permissionLevel.ToString()) : null, "permissionLevel" ,container.Add ); + AddIf( null != (((object)this._role)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._role.ToString()) : null, "role" ,container.Add ); + AddIf( null != this._backupRetentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._backupRetentionPeriodInDay) : null, "backupRetentionPeriodInDays" ,container.Add ); + if (null != this._whitelistedIP) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._whitelistedIP ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("whitelistedIps",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..3ad61842061a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.PowerShell.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTagsTypeConverter))] + public partial class AutonomousDatabaseUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseUpdateTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseUpdateTagsTypeConverter))] + public partial interface IAutonomousDatabaseUpdateTags + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..8dc9dffb163a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.cs new file mode 100644 index 000000000000..dce89dda73df --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class AutonomousDatabaseUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTagsInternal + { + + /// Creates an new instance. + public AutonomousDatabaseUpdateTags() + { + + } + } + /// Resource tags. + public partial interface IAutonomousDatabaseUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IAutonomousDatabaseUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.dictionary.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.dictionary.cs new file mode 100644 index 000000000000..206d1e1025b3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabaseUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.json.cs new file mode 100644 index 000000000000..4f070ebad8d9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class AutonomousDatabaseUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + /// + internal AutonomousDatabaseUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.PowerShell.cs new file mode 100644 index 000000000000..a0c5049c582c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database Wallet File resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseWalletFileTypeConverter))] + public partial class AutonomousDatabaseWalletFile + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseWalletFile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WalletFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFileInternal)this).WalletFile = (string) content.GetValueForProperty("WalletFile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFileInternal)this).WalletFile, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseWalletFile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("WalletFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFileInternal)this).WalletFile = (string) content.GetValueForProperty("WalletFile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFileInternal)this).WalletFile, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseWalletFile(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseWalletFile(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database Wallet File resource model. + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseWalletFileTypeConverter))] + public partial interface IAutonomousDatabaseWalletFile + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.TypeConverter.cs new file mode 100644 index 000000000000..11ebeb6a9dac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseWalletFileTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseWalletFile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseWalletFile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseWalletFile.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.cs new file mode 100644 index 000000000000..d8ba1cffa41d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database Wallet File resource model. + public partial class AutonomousDatabaseWalletFile : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFileInternal + { + + /// Backing field for property. + private string _walletFile; + + /// The base64 encoded wallet files + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string WalletFile { get => this._walletFile; set => this._walletFile = value; } + + /// Creates an new instance. + public AutonomousDatabaseWalletFile() + { + + } + } + /// Autonomous Database Wallet File resource model. + public partial interface IAutonomousDatabaseWalletFile : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The base64 encoded wallet files + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The base64 encoded wallet files", + SerializedName = @"walletFiles", + PossibleTypes = new [] { typeof(string) })] + string WalletFile { get; set; } + + } + /// Autonomous Database Wallet File resource model. + internal partial interface IAutonomousDatabaseWalletFileInternal + + { + /// The base64 encoded wallet files + string WalletFile { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.json.cs new file mode 100644 index 000000000000..e17949da68c4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDatabaseWalletFile.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database Wallet File resource model. + public partial class AutonomousDatabaseWalletFile + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseWalletFile(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_walletFile = If( json?.PropertyT("walletFiles"), out var __jsonWalletFiles) ? (string)__jsonWalletFiles : (string)WalletFile;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseWalletFile(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._walletFile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._walletFile.ToString()) : null, "walletFiles" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.PowerShell.cs new file mode 100644 index 000000000000..d8d27a6ee795 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.PowerShell.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDbVersion resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionTypeConverter))] + public partial class AutonomousDbVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDbVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDbVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDbVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDbVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDbVersion resource definition + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionTypeConverter))] + public partial interface IAutonomousDbVersion + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.TypeConverter.cs new file mode 100644 index 000000000000..804a25ca3847 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDbVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDbVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDbVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDbVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.cs new file mode 100644 index 000000000000..1ae102393ca6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDbVersion resource definition + public partial class AutonomousDbVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).DbWorkload; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).DbWorkload = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType)""); } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsDefaultForFree { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForFree; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForFree = value ?? default(bool); } + + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsDefaultForPaid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForPaid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsDefaultForPaid = value ?? default(bool); } + + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsFreeTierEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsFreeTierEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsFreeTierEnabled = value ?? default(bool); } + + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsPaidEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsPaidEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).IsPaidEnabled = value ?? default(bool); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)Property).Version = value ?? null; } + + /// Creates an new instance. + public AutonomousDbVersion() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// AutonomousDbVersion resource definition + public partial interface IAutonomousDbVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software's default is free.", + SerializedName = @"isDefaultForFree", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForFree { get; set; } + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software's default is paid.", + SerializedName = @"isDefaultForPaid", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForPaid { get; set; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases.", + SerializedName = @"isFreeTierEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsFreeTierEnabled { get; set; } + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software has payments enabled.", + SerializedName = @"isPaidEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPaidEnabled { get; set; } + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Supported Autonomous Db versions.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// AutonomousDbVersion resource definition + internal partial interface IAutonomousDbVersionInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The Autonomous Database workload type + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// True if this version of the Oracle Database software's default is free. + bool? IsDefaultForFree { get; set; } + /// True if this version of the Oracle Database software's default is paid. + bool? IsDefaultForPaid { get; set; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + bool? IsFreeTierEnabled { get; set; } + /// True if this version of the Oracle Database software has payments enabled. + bool? IsPaidEnabled { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties Property { get; set; } + /// Supported Autonomous Db versions. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.json.cs new file mode 100644 index 000000000000..a035cc4a2fb2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersion.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDbVersion resource definition + public partial class AutonomousDbVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDbVersion(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDbVersion(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..68501d59ebc6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a AutonomousDbVersion list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionListResultTypeConverter))] + public partial class AutonomousDbVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDbVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDbVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDbVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDbVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a AutonomousDbVersion list operation. + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionListResultTypeConverter))] + public partial interface IAutonomousDbVersionListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..af7f80bd2338 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDbVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDbVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDbVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDbVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.cs new file mode 100644 index 000000000000..cfa89ec768f5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDbVersion list operation. + public partial class AutonomousDbVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion[] _value; + + /// The AutonomousDbVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public AutonomousDbVersionListResult() + { + + } + } + /// The response of a AutonomousDbVersion list operation. + public partial interface IAutonomousDbVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The AutonomousDbVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The AutonomousDbVersion items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion[] Value { get; set; } + + } + /// The response of a AutonomousDbVersion list operation. + internal partial interface IAutonomousDbVersionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The AutonomousDbVersion items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.json.cs new file mode 100644 index 000000000000..5fa5e5c0de65 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a AutonomousDbVersion list operation. + public partial class AutonomousDbVersionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDbVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersion.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDbVersionListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..de492cced5dd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.PowerShell.cs @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// AutonomousDbVersion resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionPropertiesTypeConverter))] + public partial class AutonomousDbVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDbVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDbVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("DbWorkload")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).DbWorkload = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType?) content.GetValueForProperty("DbWorkload",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).DbWorkload, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType.CreateFrom); + } + if (content.Contains("IsDefaultForFree")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree = (bool?) content.GetValueForProperty("IsDefaultForFree",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForFree, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsDefaultForPaid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid = (bool?) content.GetValueForProperty("IsDefaultForPaid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsDefaultForPaid, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTierEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled = (bool?) content.GetValueForProperty("IsFreeTierEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsFreeTierEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsPaidEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled = (bool?) content.GetValueForProperty("IsPaidEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal)this).IsPaidEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDbVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDbVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// AutonomousDbVersion resource model + [System.ComponentModel.TypeConverter(typeof(AutonomousDbVersionPropertiesTypeConverter))] + public partial interface IAutonomousDbVersionProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.TypeConverter.cs new file mode 100644 index 000000000000..b7a022a4d2a2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDbVersionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDbVersionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDbVersionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDbVersionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.cs new file mode 100644 index 000000000000..5090f49f7ffe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDbVersion resource model + public partial class AutonomousDbVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? _dbWorkload; + + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get => this._dbWorkload; set => this._dbWorkload = value; } + + /// Backing field for property. + private bool? _isDefaultForFree; + + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsDefaultForFree { get => this._isDefaultForFree; set => this._isDefaultForFree = value; } + + /// Backing field for property. + private bool? _isDefaultForPaid; + + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsDefaultForPaid { get => this._isDefaultForPaid; set => this._isDefaultForPaid = value; } + + /// Backing field for property. + private bool? _isFreeTierEnabled; + + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsFreeTierEnabled { get => this._isFreeTierEnabled; set => this._isFreeTierEnabled = value; } + + /// Backing field for property. + private bool? _isPaidEnabled; + + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsPaidEnabled { get => this._isPaidEnabled; set => this._isPaidEnabled = value; } + + /// Backing field for property. + private string _version; + + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public AutonomousDbVersionProperties() + { + + } + } + /// AutonomousDbVersion resource model + public partial interface IAutonomousDbVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The Autonomous Database workload type + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// True if this version of the Oracle Database software's default is free. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software's default is free.", + SerializedName = @"isDefaultForFree", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForFree { get; set; } + /// True if this version of the Oracle Database software's default is paid. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software's default is paid.", + SerializedName = @"isDefaultForPaid", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDefaultForPaid { get; set; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases.", + SerializedName = @"isFreeTierEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsFreeTierEnabled { get; set; } + /// True if this version of the Oracle Database software has payments enabled. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True if this version of the Oracle Database software has payments enabled.", + SerializedName = @"isPaidEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsPaidEnabled { get; set; } + /// Supported Autonomous Db versions. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Supported Autonomous Db versions.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// AutonomousDbVersion resource model + internal partial interface IAutonomousDbVersionPropertiesInternal + + { + /// The Autonomous Database workload type + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType? DbWorkload { get; set; } + /// True if this version of the Oracle Database software's default is free. + bool? IsDefaultForFree { get; set; } + /// True if this version of the Oracle Database software's default is paid. + bool? IsDefaultForPaid { get; set; } + /// + /// True if this version of the Oracle Database software can be used for Always-Free Autonomous Databases. + /// + bool? IsFreeTierEnabled { get; set; } + /// True if this version of the Oracle Database software has payments enabled. + bool? IsPaidEnabled { get; set; } + /// Supported Autonomous Db versions. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.json.cs new file mode 100644 index 000000000000..b1dcf4460971 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AutonomousDbVersionProperties.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// AutonomousDbVersion resource model + public partial class AutonomousDbVersionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDbVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + {_dbWorkload = If( json?.PropertyT("dbWorkload"), out var __jsonDbWorkload) ? (string)__jsonDbWorkload : (string)DbWorkload;} + {_isDefaultForFree = If( json?.PropertyT("isDefaultForFree"), out var __jsonIsDefaultForFree) ? (bool?)__jsonIsDefaultForFree : IsDefaultForFree;} + {_isDefaultForPaid = If( json?.PropertyT("isDefaultForPaid"), out var __jsonIsDefaultForPaid) ? (bool?)__jsonIsDefaultForPaid : IsDefaultForPaid;} + {_isFreeTierEnabled = If( json?.PropertyT("isFreeTierEnabled"), out var __jsonIsFreeTierEnabled) ? (bool?)__jsonIsFreeTierEnabled : IsFreeTierEnabled;} + {_isPaidEnabled = If( json?.PropertyT("isPaidEnabled"), out var __jsonIsPaidEnabled) ? (bool?)__jsonIsPaidEnabled : IsPaidEnabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDbVersionProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AddIf( null != (((object)this._dbWorkload)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbWorkload.ToString()) : null, "dbWorkload" ,container.Add ); + AddIf( null != this._isDefaultForFree ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isDefaultForFree) : null, "isDefaultForFree" ,container.Add ); + AddIf( null != this._isDefaultForPaid ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isDefaultForPaid) : null, "isDefaultForPaid" ,container.Add ); + AddIf( null != this._isFreeTierEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isFreeTierEnabled) : null, "isFreeTierEnabled" ,container.Add ); + AddIf( null != this._isPaidEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isPaidEnabled) : null, "isPaidEnabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.PowerShell.cs new file mode 100644 index 000000000000..63054604f079 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Azure Subscriptions model + [System.ComponentModel.TypeConverter(typeof(AzureSubscriptionsTypeConverter))] + public partial class AzureSubscriptions + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AzureSubscriptions(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptionsInternal)this).AzureSubscriptionId = (string[]) content.GetValueForProperty("AzureSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptionsInternal)this).AzureSubscriptionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AzureSubscriptions(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AzureSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptionsInternal)this).AzureSubscriptionId = (string[]) content.GetValueForProperty("AzureSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptionsInternal)this).AzureSubscriptionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureSubscriptions(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureSubscriptions(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Azure Subscriptions model + [System.ComponentModel.TypeConverter(typeof(AzureSubscriptionsTypeConverter))] + public partial interface IAzureSubscriptions + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.TypeConverter.cs new file mode 100644 index 000000000000..4bf51b4fef36 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AzureSubscriptionsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AzureSubscriptions.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AzureSubscriptions.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AzureSubscriptions.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.cs new file mode 100644 index 000000000000..b8cbdda9f3cf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Azure Subscriptions model + public partial class AzureSubscriptions : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptionsInternal + { + + /// Backing field for property. + private string[] _azureSubscriptionId; + + /// Azure Subscription Ids to be updated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] AzureSubscriptionId { get => this._azureSubscriptionId; set => this._azureSubscriptionId = value; } + + /// Creates an new instance. + public AzureSubscriptions() + { + + } + } + /// Azure Subscriptions model + public partial interface IAzureSubscriptions : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Azure Subscription Ids to be updated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription Ids to be updated", + SerializedName = @"azureSubscriptionIds", + PossibleTypes = new [] { typeof(string) })] + string[] AzureSubscriptionId { get; set; } + + } + /// Azure Subscriptions model + internal partial interface IAzureSubscriptionsInternal + + { + /// Azure Subscription Ids to be updated + string[] AzureSubscriptionId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.json.cs new file mode 100644 index 000000000000..bff9b41dff57 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/AzureSubscriptions.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Azure Subscriptions model + public partial class AzureSubscriptions + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AzureSubscriptions(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_azureSubscriptionId = If( json?.PropertyT("azureSubscriptionIds"), out var __jsonAzureSubscriptionIds) ? If( __jsonAzureSubscriptionIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AzureSubscriptionId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AzureSubscriptions(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._azureSubscriptionId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._azureSubscriptionId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("azureSubscriptionIds",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.PowerShell.cs new file mode 100644 index 000000000000..7683e2a3e094 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Cloud Account Details model + [System.ComponentModel.TypeConverter(typeof(CloudAccountDetailsTypeConverter))] + public partial class CloudAccountDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudAccountDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CloudAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountName = (string) content.GetValueForProperty("CloudAccountName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountName, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountHomeRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion = (string) content.GetValueForProperty("CloudAccountHomeRegion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudAccountDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CloudAccountName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountName = (string) content.GetValueForProperty("CloudAccountName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountName, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountHomeRegion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion = (string) content.GetValueForProperty("CloudAccountHomeRegion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal)this).CloudAccountHomeRegion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudAccountDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudAccountDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Cloud Account Details model + [System.ComponentModel.TypeConverter(typeof(CloudAccountDetailsTypeConverter))] + public partial interface ICloudAccountDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.TypeConverter.cs new file mode 100644 index 000000000000..a890e552bd40 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudAccountDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudAccountDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudAccountDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudAccountDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.cs new file mode 100644 index 000000000000..b5196771499e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Cloud Account Details model + public partial class CloudAccountDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal + { + + /// Backing field for property. + private string _cloudAccountHomeRegion; + + /// Cloud Account Home region + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CloudAccountHomeRegion { get => this._cloudAccountHomeRegion; } + + /// Backing field for property. + private string _cloudAccountName; + + /// Cloud Account name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CloudAccountName { get => this._cloudAccountName; } + + /// Internal Acessors for CloudAccountHomeRegion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal.CloudAccountHomeRegion { get => this._cloudAccountHomeRegion; set { {_cloudAccountHomeRegion = value;} } } + + /// Internal Acessors for CloudAccountName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetailsInternal.CloudAccountName { get => this._cloudAccountName; set { {_cloudAccountName = value;} } } + + /// Creates an new instance. + public CloudAccountDetails() + { + + } + } + /// Cloud Account Details model + public partial interface ICloudAccountDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Cloud Account Home region + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud Account Home region", + SerializedName = @"cloudAccountHomeRegion", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountHomeRegion { get; } + /// Cloud Account name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud Account name", + SerializedName = @"cloudAccountName", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountName { get; } + + } + /// Cloud Account Details model + internal partial interface ICloudAccountDetailsInternal + + { + /// Cloud Account Home region + string CloudAccountHomeRegion { get; set; } + /// Cloud Account name + string CloudAccountName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.json.cs new file mode 100644 index 000000000000..2e34fa8d01bf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudAccountDetails.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Cloud Account Details model + public partial class CloudAccountDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudAccountDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_cloudAccountName = If( json?.PropertyT("cloudAccountName"), out var __jsonCloudAccountName) ? (string)__jsonCloudAccountName : (string)CloudAccountName;} + {_cloudAccountHomeRegion = If( json?.PropertyT("cloudAccountHomeRegion"), out var __jsonCloudAccountHomeRegion) ? (string)__jsonCloudAccountHomeRegion : (string)CloudAccountHomeRegion;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudAccountDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._cloudAccountName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloudAccountName.ToString()) : null, "cloudAccountName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._cloudAccountHomeRegion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloudAccountHomeRegion.ToString()) : null, "cloudAccountHomeRegion" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.PowerShell.cs new file mode 100644 index 000000000000..d19e14c49e34 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.PowerShell.cs @@ -0,0 +1,658 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// CloudExadataInfrastructure resource definition + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureTypeConverter))] + public partial class CloudExadataInfrastructure + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructure(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructurePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("DefinedFileSystemConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DefinedFileSystemConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[]) content.GetValueForProperty("DefinedFileSystemConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DefinedFileSystemConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DefinedFileSystemConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState.CreateFrom); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("DatabaseServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DatabaseServerType = (string) content.GetValueForProperty("DatabaseServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DatabaseServerType, global::System.Convert.ToString); + } + if (content.Contains("StorageServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerType = (string) content.GetValueForProperty("StorageServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerType, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructure(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructurePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("DefinedFileSystemConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DefinedFileSystemConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[]) content.GetValueForProperty("DefinedFileSystemConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DefinedFileSystemConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DefinedFileSystemConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState.CreateFrom); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("DatabaseServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DatabaseServerType = (string) content.GetValueForProperty("DatabaseServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).DatabaseServerType, global::System.Convert.ToString); + } + if (content.Contains("StorageServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerType = (string) content.GetValueForProperty("StorageServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).StorageServerType, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructure(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructure(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// CloudExadataInfrastructure resource definition + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureTypeConverter))] + public partial interface ICloudExadataInfrastructure + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.TypeConverter.cs new file mode 100644 index 000000000000..8576ac539576 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructure.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructure.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructure.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.cs new file mode 100644 index 000000000000..362e71f42da7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.cs @@ -0,0 +1,1066 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudExadataInfrastructure resource definition + public partial class CloudExadataInfrastructure : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(); + + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ActivatedStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ActivatedStorageCount; } + + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AdditionalStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).AdditionalStorageCount; } + + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).AvailableStorageSizeInGb; } + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ComputeCount = value ?? default(int); } + + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ComputeModel; } + + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).CpuCount; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DataStorageSizeInTb; } + + /// The database server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DatabaseServerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DatabaseServerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DatabaseServerType = value ?? null; } + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DbNodeStorageSizeInGb; } + + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DbServerVersion; } + + /// Defined file system configurations + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] DefinedFileSystemConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DefinedFileSystemConfiguration; } + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DisplayName = value ?? null; } + + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedDbServerPatchingTime; } + + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime; } + + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedStorageServerPatchingTime; } + + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeTotalEstimatedPatchingTime; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; } + + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LastMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LastMaintenanceRunId; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleDetail; } + + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleState; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowDaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowDaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowHoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowHoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowMonth = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPatchingMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode)""); } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPreference; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowPreference = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth = value ?? null /* arrayOf */; } + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxCpuCount; } + + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? MaxDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDataStorageInTb; } + + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaxDbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDbNodeStorageSizeInGb; } + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxMemoryInGb; } + + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MemorySizeInGb; } + + /// Internal Acessors for ActivatedStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.ActivatedStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ActivatedStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ActivatedStorageCount = value; } + + /// Internal Acessors for AdditionalStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.AdditionalStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).AdditionalStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).AdditionalStorageCount = value; } + + /// Internal Acessors for AvailableStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.AvailableStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).AvailableStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).AvailableStorageSizeInGb = value; } + + /// Internal Acessors for ComputeModel + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ComputeModel = value; } + + /// Internal Acessors for CpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.CpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).CpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).CpuCount = value; } + + /// Internal Acessors for DataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DataStorageSizeInTb = value; } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DbNodeStorageSizeInGb = value; } + + /// Internal Acessors for DbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.DbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DbServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DbServerVersion = value; } + + /// Internal Acessors for DefinedFileSystemConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.DefinedFileSystemConfiguration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DefinedFileSystemConfiguration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).DefinedFileSystemConfiguration = value; } + + /// Internal Acessors for EstimatedPatchingTime + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.EstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedDbServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedDbServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedDbServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedStorageServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedStorageServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeTotalEstimatedPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeTotalEstimatedPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).EstimatedPatchingTimeTotalEstimatedPatchingTime = value; } + + /// Internal Acessors for LastMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.LastMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LastMaintenanceRunId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LastMaintenanceRunId = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MaintenanceWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaintenanceWindow = value; } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxCpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxCpuCount = value; } + + /// Internal Acessors for MaxDataStorageInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MaxDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDataStorageInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDataStorageInTb = value; } + + /// Internal Acessors for MaxDbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MaxDbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxDbNodeStorageSizeInGb = value; } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxMemoryInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MaxMemoryInGb = value; } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MemorySizeInGb = value; } + + /// Internal Acessors for MonthlyDbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MonthlyDbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyDbServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyDbServerVersion = value; } + + /// Internal Acessors for MonthlyStorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.MonthlyStorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyStorageServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyStorageServerVersion = value; } + + /// Internal Acessors for NextMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.NextMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).NextMaintenanceRunId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).NextMaintenanceRunId = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for StorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.StorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerVersion = value; } + + /// Internal Acessors for TimeCreated + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for TotalStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal.TotalStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).TotalStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).TotalStorageSizeInGb = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type = value; } + + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string MonthlyDbServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyDbServerVersion; } + + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string MonthlyStorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).MonthlyStorageServerVersion; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; } + + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string NextMaintenanceRunId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).NextMaintenanceRunId; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).OciUrl; } + + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureProperties()); set => this._property = value; } + + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).ProvisioningState; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).Shape = value ?? null; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? StorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).StorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).StorageCount = value ?? default(int); } + + /// The storage server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string StorageServerType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerType = value ?? null; } + + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string StorageServerVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).StorageServerVersion; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).TimeCreated; } + + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? TotalStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)Property).TotalStorageSizeInGb; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; } + + /// Backing field for property. + private string[] _zone; + + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public CloudExadataInfrastructure() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// CloudExadataInfrastructure resource definition + public partial interface ICloudExadataInfrastructure : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The requested number of additional storage servers activated for the Exadata infrastructure.", + SerializedName = @"activatedStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? ActivatedStorageCount { get; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The requested number of additional storage servers for the Exadata infrastructure.", + SerializedName = @"additionalStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? AdditionalStorageCount { get; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"availableStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableStorageSizeInGb { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the Exadata Infrastructure", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; } + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total number of CPU cores allocated.", + SerializedName = @"cpuCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCount { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; } + /// The database server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database server model type of the cloud Exadata infrastructure resource.", + SerializedName = @"databaseServerType", + PossibleTypes = new [] { typeof(string) })] + string DatabaseServerType { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The software version of the database servers (dom0) in the Exadata infrastructure.", + SerializedName = @"dbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string DbServerVersion { get; } + /// Defined file system configurations + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Defined file system configurations", + SerializedName = @"definedFileSystemConfiguration", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] DefinedFileSystemConfiguration { get; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for database server patching.", + SerializedName = @"estimatedDbServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; } + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for network switch patching.", + SerializedName = @"estimatedNetworkSwitchesPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; } + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for storage server patching.", + SerializedName = @"estimatedStorageServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; } + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated total time required in minutes for all patching operations.", + SerializedName = @"totalEstimatedPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; } + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the last maintenance run.", + SerializedName = @"lastMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string LastMaintenanceRunId { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudExadataInfrastructure lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? LifecycleState { get; } + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total available DATA disk group size.", + SerializedName = @"maxDataStorageInTbs", + PossibleTypes = new [] { typeof(double) })] + double? MaxDataStorageInTb { get; } + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total local node storage available in GBs.", + SerializedName = @"maxDbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageSizeInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The memory allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Monthly Db Server version", + SerializedName = @"monthlyDbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyDbServerVersion { get; } + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Monthly Storage Server version", + SerializedName = @"monthlyStorageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyStorageServerVersion { get; } + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the next maintenance run.", + SerializedName = @"nextMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string NextMaintenanceRunId { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata infra ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudExadataInfrastructure provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The model name of the cloud Exadata infrastructure resource.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + /// The storage server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The storage server model type of the cloud Exadata infrastructure resource.", + SerializedName = @"storageServerType", + PossibleTypes = new [] { typeof(string) })] + string StorageServerType { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The software version of the storage servers (cells) in the Exadata infrastructure.", + SerializedName = @"storageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string StorageServerVersion { get; } + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the cloud Exadata infrastructure resource was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(string) })] + string TimeCreated { get; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"totalStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? TotalStorageSizeInGb { get; } + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + string[] Zone { get; set; } + + } + /// CloudExadataInfrastructure resource definition + internal partial interface ICloudExadataInfrastructureInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + int? ActivatedStorageCount { get; set; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + int? AdditionalStorageCount { get; set; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? AvailableStorageSizeInGb { get; set; } + + string AzureAsyncOperation { get; set; } + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// The compute model of the Exadata Infrastructure + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The total number of CPU cores allocated. + int? CpuCount { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + double? DataStorageSizeInTb { get; set; } + /// The database server model type of the cloud Exadata infrastructure resource. + string DatabaseServerType { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + string DbServerVersion { get; set; } + /// Defined file system configurations + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] DefinedFileSystemConfiguration { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime EstimatedPatchingTime { get; set; } + /// The estimated time required in minutes for database server patching. + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; set; } + /// The estimated time required in minutes for network switch patching. + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; set; } + /// The estimated time required in minutes for storage server patching. + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; set; } + /// The estimated total time required in minutes for all patching operations. + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; set; } + /// The OCID of the last maintenance run. + string LastMaintenanceRunId { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudExadataInfrastructure lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? LifecycleState { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// 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). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total available DATA disk group size. + double? MaxDataStorageInTb { get; set; } + /// The total local node storage available in GBs. + int? MaxDbNodeStorageSizeInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The memory allocated in GBs. + int? MemorySizeInGb { get; set; } + /// Monthly Db Server version + string MonthlyDbServerVersion { get; set; } + /// Monthly Storage Server version + string MonthlyStorageServerVersion { get; set; } + /// The OCID of the next maintenance run. + string NextMaintenanceRunId { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Exadata infra ocid + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties Property { get; set; } + /// CloudExadataInfrastructure provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + + int? RetryAfter { get; set; } + /// The model name of the cloud Exadata infrastructure resource. + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + /// The storage server model type of the cloud Exadata infrastructure resource. + string StorageServerType { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + string StorageServerVersion { get; set; } + /// The date and time the cloud Exadata infrastructure resource was created. + string TimeCreated { get; set; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? TotalStorageSizeInGb { get; set; } + /// CloudExadataInfrastructure zones + string[] Zone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.json.cs new file mode 100644 index 000000000000..f92eab1e2a85 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructure.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudExadataInfrastructure resource definition + public partial class CloudExadataInfrastructure + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructure(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureProperties.FromJson(__jsonProperties) : Property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Zone;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructure(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.PowerShell.cs new file mode 100644 index 000000000000..ab0fc96aaf6d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a CloudExadataInfrastructure list operation. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureListResultTypeConverter))] + public partial class CloudExadataInfrastructureListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a CloudExadataInfrastructure list operation. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureListResultTypeConverter))] + public partial interface ICloudExadataInfrastructureListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.TypeConverter.cs new file mode 100644 index 000000000000..57e5c4e7a789 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.cs new file mode 100644 index 000000000000..08712cc65fd7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a CloudExadataInfrastructure list operation. + public partial class CloudExadataInfrastructureListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure[] _value; + + /// The CloudExadataInfrastructure items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public CloudExadataInfrastructureListResult() + { + + } + } + /// The response of a CloudExadataInfrastructure list operation. + public partial interface ICloudExadataInfrastructureListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The CloudExadataInfrastructure items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The CloudExadataInfrastructure items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure[] Value { get; set; } + + } + /// The response of a CloudExadataInfrastructure list operation. + internal partial interface ICloudExadataInfrastructureListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The CloudExadataInfrastructure items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.json.cs new file mode 100644 index 000000000000..54c331f7030b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureListResult.json.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a CloudExadataInfrastructure list operation. + public partial class CloudExadataInfrastructureListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.PowerShell.cs new file mode 100644 index 000000000000..994c4eb281b4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.PowerShell.cs @@ -0,0 +1,532 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// CloudExadataInfrastructure resource model + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructurePropertiesTypeConverter))] + public partial class CloudExadataInfrastructureProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("DefinedFileSystemConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DefinedFileSystemConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[]) content.GetValueForProperty("DefinedFileSystemConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DefinedFileSystemConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DefinedFileSystemConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState.CreateFrom); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("DatabaseServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DatabaseServerType = (string) content.GetValueForProperty("DatabaseServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DatabaseServerType, global::System.Convert.ToString); + } + if (content.Contains("StorageServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerType = (string) content.GetValueForProperty("StorageServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerType, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("EstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime) content.GetValueForProperty("EstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTime, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTimeTypeConverter.ConvertFrom); + } + if (content.Contains("DefinedFileSystemConfiguration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DefinedFileSystemConfiguration = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[]) content.GetValueForProperty("DefinedFileSystemConfiguration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DefinedFileSystemConfiguration, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DefinedFileSystemConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb = (int?) content.GetValueForProperty("TotalStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TotalStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb = (int?) content.GetValueForProperty("AvailableStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AvailableStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated = (string) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).TimeCreated, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState.CreateFrom); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("CpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount = (int?) content.GetValueForProperty("CpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).CpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxDbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("MaxDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb = (double?) content.GetValueForProperty("MaxDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaxDataStorageInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion = (string) content.GetValueForProperty("DbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("StorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion = (string) content.GetValueForProperty("StorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("ActivatedStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount = (int?) content.GetValueForProperty("ActivatedStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ActivatedStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AdditionalStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount = (int?) content.GetValueForProperty("AdditionalStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).AdditionalStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("LastMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId = (string) content.GetValueForProperty("LastMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).LastMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("NextMaintenanceRunId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId = (string) content.GetValueForProperty("NextMaintenanceRunId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).NextMaintenanceRunId, global::System.Convert.ToString); + } + if (content.Contains("MonthlyDbServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion = (string) content.GetValueForProperty("MonthlyDbServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyDbServerVersion, global::System.Convert.ToString); + } + if (content.Contains("MonthlyStorageServerVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion = (string) content.GetValueForProperty("MonthlyStorageServerVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MonthlyStorageServerVersion, global::System.Convert.ToString); + } + if (content.Contains("DatabaseServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DatabaseServerType = (string) content.GetValueForProperty("DatabaseServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).DatabaseServerType, global::System.Convert.ToString); + } + if (content.Contains("StorageServerType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerType = (string) content.GetValueForProperty("StorageServerType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).StorageServerType, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeEstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeEstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeEstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedPatchingTimeTotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime = (int?) content.GetValueForProperty("EstimatedPatchingTimeTotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal)this).EstimatedPatchingTimeTotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// CloudExadataInfrastructure resource model + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructurePropertiesTypeConverter))] + public partial interface ICloudExadataInfrastructureProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.TypeConverter.cs new file mode 100644 index 000000000000..86f0d40cb26e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructurePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.cs new file mode 100644 index 000000000000..819b9466dd3d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.cs @@ -0,0 +1,1022 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudExadataInfrastructure resource model + public partial class CloudExadataInfrastructureProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal + { + + /// Backing field for property. + private int? _activatedStorageCount; + + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ActivatedStorageCount { get => this._activatedStorageCount; } + + /// Backing field for property. + private int? _additionalStorageCount; + + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AdditionalStorageCount { get => this._additionalStorageCount; } + + /// Backing field for property. + private int? _availableStorageSizeInGb; + + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableStorageSizeInGb { get => this._availableStorageSizeInGb; } + + /// Backing field for property. + private int? _computeCount; + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? _computeModel; + + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => this._computeModel; } + + /// Backing field for property. + private int? _cpuCount; + + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CpuCount { get => this._cpuCount; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] _customerContact; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private double? _dataStorageSizeInTb; + + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? DataStorageSizeInTb { get => this._dataStorageSizeInTb; } + + /// Backing field for property. + private string _databaseServerType; + + /// The database server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DatabaseServerType { get => this._databaseServerType; set => this._databaseServerType = value; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; } + + /// Backing field for property. + private string _dbServerVersion; + + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DbServerVersion { get => this._dbServerVersion; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] _definedFileSystemConfiguration; + + /// Defined file system configurations + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] DefinedFileSystemConfiguration { get => this._definedFileSystemConfiguration; } + + /// Backing field for property. + private string _displayName; + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime _estimatedPatchingTime; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime EstimatedPatchingTime { get => (this._estimatedPatchingTime = this._estimatedPatchingTime ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTime()); } + + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedDbServerPatchingTime; } + + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedNetworkSwitchesPatchingTime; } + + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedStorageServerPatchingTime; } + + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).TotalEstimatedPatchingTime; } + + /// Backing field for property. + private string _lastMaintenanceRunId; + + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LastMaintenanceRunId { get => this._lastMaintenanceRunId; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? _lifecycleState; + + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow _maintenanceWindow; + + /// maintenanceWindow property + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow()); set => this._maintenanceWindow = value; } + + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Month; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Month = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode)""); } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Preference; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Preference = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth = value ?? null /* arrayOf */; } + + /// Backing field for property. + private int? _maxCpuCount; + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaxCpuCount { get => this._maxCpuCount; } + + /// Backing field for property. + private double? _maxDataStorageInTb; + + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? MaxDataStorageInTb { get => this._maxDataStorageInTb; } + + /// Backing field for property. + private int? _maxDbNodeStorageSizeInGb; + + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaxDbNodeStorageSizeInGb { get => this._maxDbNodeStorageSizeInGb; } + + /// Backing field for property. + private int? _maxMemoryInGb; + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaxMemoryInGb { get => this._maxMemoryInGb; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; } + + /// Internal Acessors for ActivatedStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.ActivatedStorageCount { get => this._activatedStorageCount; set { {_activatedStorageCount = value;} } } + + /// Internal Acessors for AdditionalStorageCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.AdditionalStorageCount { get => this._additionalStorageCount; set { {_additionalStorageCount = value;} } } + + /// Internal Acessors for AvailableStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.AvailableStorageSizeInGb { get => this._availableStorageSizeInGb; set { {_availableStorageSizeInGb = value;} } } + + /// Internal Acessors for ComputeModel + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.ComputeModel { get => this._computeModel; set { {_computeModel = value;} } } + + /// Internal Acessors for CpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.CpuCount { get => this._cpuCount; set { {_cpuCount = value;} } } + + /// Internal Acessors for DataStorageSizeInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.DataStorageSizeInTb { get => this._dataStorageSizeInTb; set { {_dataStorageSizeInTb = value;} } } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set { {_dbNodeStorageSizeInGb = value;} } } + + /// Internal Acessors for DbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.DbServerVersion { get => this._dbServerVersion; set { {_dbServerVersion = value;} } } + + /// Internal Acessors for DefinedFileSystemConfiguration + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.DefinedFileSystemConfiguration { get => this._definedFileSystemConfiguration; set { {_definedFileSystemConfiguration = value;} } } + + /// Internal Acessors for EstimatedPatchingTime + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTime { get => (this._estimatedPatchingTime = this._estimatedPatchingTime ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTime()); set { {_estimatedPatchingTime = value;} } } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedDbServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeEstimatedDbServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedDbServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedDbServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedNetworkSwitchesPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedNetworkSwitchesPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeEstimatedStorageServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedStorageServerPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).EstimatedStorageServerPatchingTime = value; } + + /// Internal Acessors for EstimatedPatchingTimeTotalEstimatedPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.EstimatedPatchingTimeTotalEstimatedPatchingTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).TotalEstimatedPatchingTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)EstimatedPatchingTime).TotalEstimatedPatchingTime = value; } + + /// Internal Acessors for LastMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.LastMaintenanceRunId { get => this._lastMaintenanceRunId; set { {_lastMaintenanceRunId = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow()); set { {_maintenanceWindow = value;} } } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MaxCpuCount { get => this._maxCpuCount; set { {_maxCpuCount = value;} } } + + /// Internal Acessors for MaxDataStorageInTb + double? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MaxDataStorageInTb { get => this._maxDataStorageInTb; set { {_maxDataStorageInTb = value;} } } + + /// Internal Acessors for MaxDbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MaxDbNodeStorageSizeInGb { get => this._maxDbNodeStorageSizeInGb; set { {_maxDbNodeStorageSizeInGb = value;} } } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MaxMemoryInGb { get => this._maxMemoryInGb; set { {_maxMemoryInGb = value;} } } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MemorySizeInGb { get => this._memorySizeInGb; set { {_memorySizeInGb = value;} } } + + /// Internal Acessors for MonthlyDbServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MonthlyDbServerVersion { get => this._monthlyDbServerVersion; set { {_monthlyDbServerVersion = value;} } } + + /// Internal Acessors for MonthlyStorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.MonthlyStorageServerVersion { get => this._monthlyStorageServerVersion; set { {_monthlyStorageServerVersion = value;} } } + + /// Internal Acessors for NextMaintenanceRunId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.NextMaintenanceRunId { get => this._nextMaintenanceRunId; set { {_nextMaintenanceRunId = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for StorageServerVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.StorageServerVersion { get => this._storageServerVersion; set { {_storageServerVersion = value;} } } + + /// Internal Acessors for TimeCreated + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for TotalStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructurePropertiesInternal.TotalStorageSizeInGb { get => this._totalStorageSizeInGb; set { {_totalStorageSizeInGb = value;} } } + + /// Backing field for property. + private string _monthlyDbServerVersion; + + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string MonthlyDbServerVersion { get => this._monthlyDbServerVersion; } + + /// Backing field for property. + private string _monthlyStorageServerVersion; + + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string MonthlyStorageServerVersion { get => this._monthlyStorageServerVersion; } + + /// Backing field for property. + private string _nextMaintenanceRunId; + + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextMaintenanceRunId { get => this._nextMaintenanceRunId; } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _shape; + + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Shape { get => this._shape; set => this._shape = value; } + + /// Backing field for property. + private int? _storageCount; + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? StorageCount { get => this._storageCount; set => this._storageCount = value; } + + /// Backing field for property. + private string _storageServerType; + + /// The storage server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string StorageServerType { get => this._storageServerType; set => this._storageServerType = value; } + + /// Backing field for property. + private string _storageServerVersion; + + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string StorageServerVersion { get => this._storageServerVersion; } + + /// Backing field for property. + private string _timeCreated; + + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private int? _totalStorageSizeInGb; + + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? TotalStorageSizeInGb { get => this._totalStorageSizeInGb; } + + /// Creates an new instance. + public CloudExadataInfrastructureProperties() + { + + } + } + /// CloudExadataInfrastructure resource model + public partial interface ICloudExadataInfrastructureProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The requested number of additional storage servers activated for the Exadata infrastructure.", + SerializedName = @"activatedStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? ActivatedStorageCount { get; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The requested number of additional storage servers for the Exadata infrastructure.", + SerializedName = @"additionalStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? AdditionalStorageCount { get; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"availableStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableStorageSizeInGb { get; } + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the Exadata Infrastructure", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; } + /// The total number of CPU cores allocated. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total number of CPU cores allocated.", + SerializedName = @"cpuCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCount { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; } + /// The database server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database server model type of the cloud Exadata infrastructure resource.", + SerializedName = @"databaseServerType", + PossibleTypes = new [] { typeof(string) })] + string DatabaseServerType { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The software version of the database servers (dom0) in the Exadata infrastructure.", + SerializedName = @"dbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string DbServerVersion { get; } + /// Defined file system configurations + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Defined file system configurations", + SerializedName = @"definedFileSystemConfiguration", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] DefinedFileSystemConfiguration { get; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for database server patching.", + SerializedName = @"estimatedDbServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; } + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for network switch patching.", + SerializedName = @"estimatedNetworkSwitchesPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; } + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for storage server patching.", + SerializedName = @"estimatedStorageServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; } + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated total time required in minutes for all patching operations.", + SerializedName = @"totalEstimatedPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; } + /// The OCID of the last maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the last maintenance run.", + SerializedName = @"lastMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string LastMaintenanceRunId { get; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudExadataInfrastructure lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudExadataInfrastructure lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? LifecycleState { get; } + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total available DATA disk group size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total available DATA disk group size.", + SerializedName = @"maxDataStorageInTbs", + PossibleTypes = new [] { typeof(double) })] + double? MaxDataStorageInTb { get; } + /// The total local node storage available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total local node storage available in GBs.", + SerializedName = @"maxDbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageSizeInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The memory allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The memory allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Monthly Db Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Monthly Db Server version", + SerializedName = @"monthlyDbServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyDbServerVersion { get; } + /// Monthly Storage Server version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Monthly Storage Server version", + SerializedName = @"monthlyStorageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string MonthlyStorageServerVersion { get; } + /// The OCID of the next maintenance run. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the next maintenance run.", + SerializedName = @"nextMaintenanceRunId", + PossibleTypes = new [] { typeof(string) })] + string NextMaintenanceRunId { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Exadata infra ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata infra ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// CloudExadataInfrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudExadataInfrastructure provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// The model name of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The model name of the cloud Exadata infrastructure resource.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + /// The storage server model type of the cloud Exadata infrastructure resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The storage server model type of the cloud Exadata infrastructure resource.", + SerializedName = @"storageServerType", + PossibleTypes = new [] { typeof(string) })] + string StorageServerType { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The software version of the storage servers (cells) in the Exadata infrastructure.", + SerializedName = @"storageServerVersion", + PossibleTypes = new [] { typeof(string) })] + string StorageServerVersion { get; } + /// The date and time the cloud Exadata infrastructure resource was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time the cloud Exadata infrastructure resource was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(string) })] + string TimeCreated { get; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB).", + SerializedName = @"totalStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? TotalStorageSizeInGb { get; } + + } + /// CloudExadataInfrastructure resource model + internal partial interface ICloudExadataInfrastructurePropertiesInternal + + { + /// + /// The requested number of additional storage servers activated for the Exadata infrastructure. + /// + int? ActivatedStorageCount { get; set; } + /// + /// The requested number of additional storage servers for the Exadata infrastructure. + /// + int? AdditionalStorageCount { get; set; } + /// + /// The available storage can be allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? AvailableStorageSizeInGb { get; set; } + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// The compute model of the Exadata Infrastructure + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The total number of CPU cores allocated. + int? CpuCount { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The quantity of data in the database, in terabytes. + double? DataStorageSizeInTb { get; set; } + /// The database server model type of the cloud Exadata infrastructure resource. + string DatabaseServerType { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// + /// The software version of the database servers (dom0) in the Exadata infrastructure. + /// + string DbServerVersion { get; set; } + /// Defined file system configurations + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration[] DefinedFileSystemConfiguration { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime EstimatedPatchingTime { get; set; } + /// The estimated time required in minutes for database server patching. + int? EstimatedPatchingTimeEstimatedDbServerPatchingTime { get; set; } + /// The estimated time required in minutes for network switch patching. + int? EstimatedPatchingTimeEstimatedNetworkSwitchesPatchingTime { get; set; } + /// The estimated time required in minutes for storage server patching. + int? EstimatedPatchingTimeEstimatedStorageServerPatchingTime { get; set; } + /// The estimated total time required in minutes for all patching operations. + int? EstimatedPatchingTimeTotalEstimatedPatchingTime { get; set; } + /// The OCID of the last maintenance run. + string LastMaintenanceRunId { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudExadataInfrastructure lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState? LifecycleState { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// 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). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total available DATA disk group size. + double? MaxDataStorageInTb { get; set; } + /// The total local node storage available in GBs. + int? MaxDbNodeStorageSizeInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The memory allocated in GBs. + int? MemorySizeInGb { get; set; } + /// Monthly Db Server version + string MonthlyDbServerVersion { get; set; } + /// Monthly Storage Server version + string MonthlyStorageServerVersion { get; set; } + /// The OCID of the next maintenance run. + string NextMaintenanceRunId { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Exadata infra ocid + string Ocid { get; set; } + /// CloudExadataInfrastructure provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// The model name of the cloud Exadata infrastructure resource. + string Shape { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + /// The storage server model type of the cloud Exadata infrastructure resource. + string StorageServerType { get; set; } + /// + /// The software version of the storage servers (cells) in the Exadata infrastructure. + /// + string StorageServerVersion { get; set; } + /// The date and time the cloud Exadata infrastructure resource was created. + string TimeCreated { get; set; } + /// + /// The total storage allocated to the cloud Exadata infrastructure resource, in gigabytes (GB). + /// + int? TotalStorageSizeInGb { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.json.cs new file mode 100644 index 000000000000..51e031698191 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureProperties.json.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudExadataInfrastructure resource model + public partial class CloudExadataInfrastructureProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_maintenanceWindow = If( json?.PropertyT("maintenanceWindow"), out var __jsonMaintenanceWindow) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow.FromJson(__jsonMaintenanceWindow) : MaintenanceWindow;} + {_estimatedPatchingTime = If( json?.PropertyT("estimatedPatchingTime"), out var __jsonEstimatedPatchingTime) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.EstimatedPatchingTime.FromJson(__jsonEstimatedPatchingTime) : EstimatedPatchingTime;} + {_definedFileSystemConfiguration = If( json?.PropertyT("definedFileSystemConfiguration"), out var __jsonDefinedFileSystemConfiguration) ? If( __jsonDefinedFileSystemConfiguration as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DefinedFileSystemConfiguration.FromJson(__u) )) ))() : null : DefinedFileSystemConfiguration;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (int?)__jsonComputeCount : ComputeCount;} + {_storageCount = If( json?.PropertyT("storageCount"), out var __jsonStorageCount) ? (int?)__jsonStorageCount : StorageCount;} + {_totalStorageSizeInGb = If( json?.PropertyT("totalStorageSizeInGbs"), out var __jsonTotalStorageSizeInGbs) ? (int?)__jsonTotalStorageSizeInGbs : TotalStorageSizeInGb;} + {_availableStorageSizeInGb = If( json?.PropertyT("availableStorageSizeInGbs"), out var __jsonAvailableStorageSizeInGbs) ? (int?)__jsonAvailableStorageSizeInGbs : AvailableStorageSizeInGb;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? (string)__jsonTimeCreated : (string)TimeCreated;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContact.FromJson(__p) )) ))() : null : CustomerContact;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)Shape;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)OciUrl;} + {_cpuCount = If( json?.PropertyT("cpuCount"), out var __jsonCpuCount) ? (int?)__jsonCpuCount : CpuCount;} + {_maxCpuCount = If( json?.PropertyT("maxCpuCount"), out var __jsonMaxCpuCount) ? (int?)__jsonMaxCpuCount : MaxCpuCount;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : MemorySizeInGb;} + {_maxMemoryInGb = If( json?.PropertyT("maxMemoryInGbs"), out var __jsonMaxMemoryInGbs) ? (int?)__jsonMaxMemoryInGbs : MaxMemoryInGb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : DbNodeStorageSizeInGb;} + {_maxDbNodeStorageSizeInGb = If( json?.PropertyT("maxDbNodeStorageSizeInGbs"), out var __jsonMaxDbNodeStorageSizeInGbs) ? (int?)__jsonMaxDbNodeStorageSizeInGbs : MaxDbNodeStorageSizeInGb;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (double?)__jsonDataStorageSizeInTbs : DataStorageSizeInTb;} + {_maxDataStorageInTb = If( json?.PropertyT("maxDataStorageInTbs"), out var __jsonMaxDataStorageInTbs) ? (double?)__jsonMaxDataStorageInTbs : MaxDataStorageInTb;} + {_dbServerVersion = If( json?.PropertyT("dbServerVersion"), out var __jsonDbServerVersion) ? (string)__jsonDbServerVersion : (string)DbServerVersion;} + {_storageServerVersion = If( json?.PropertyT("storageServerVersion"), out var __jsonStorageServerVersion) ? (string)__jsonStorageServerVersion : (string)StorageServerVersion;} + {_activatedStorageCount = If( json?.PropertyT("activatedStorageCount"), out var __jsonActivatedStorageCount) ? (int?)__jsonActivatedStorageCount : ActivatedStorageCount;} + {_additionalStorageCount = If( json?.PropertyT("additionalStorageCount"), out var __jsonAdditionalStorageCount) ? (int?)__jsonAdditionalStorageCount : AdditionalStorageCount;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_lastMaintenanceRunId = If( json?.PropertyT("lastMaintenanceRunId"), out var __jsonLastMaintenanceRunId) ? (string)__jsonLastMaintenanceRunId : (string)LastMaintenanceRunId;} + {_nextMaintenanceRunId = If( json?.PropertyT("nextMaintenanceRunId"), out var __jsonNextMaintenanceRunId) ? (string)__jsonNextMaintenanceRunId : (string)NextMaintenanceRunId;} + {_monthlyDbServerVersion = If( json?.PropertyT("monthlyDbServerVersion"), out var __jsonMonthlyDbServerVersion) ? (string)__jsonMonthlyDbServerVersion : (string)MonthlyDbServerVersion;} + {_monthlyStorageServerVersion = If( json?.PropertyT("monthlyStorageServerVersion"), out var __jsonMonthlyStorageServerVersion) ? (string)__jsonMonthlyStorageServerVersion : (string)MonthlyStorageServerVersion;} + {_databaseServerType = If( json?.PropertyT("databaseServerType"), out var __jsonDatabaseServerType) ? (string)__jsonDatabaseServerType : (string)DatabaseServerType;} + {_storageServerType = If( json?.PropertyT("storageServerType"), out var __jsonStorageServerType) ? (string)__jsonStorageServerType : (string)StorageServerType;} + {_computeModel = If( json?.PropertyT("computeModel"), out var __jsonComputeModel) ? (string)__jsonComputeModel : (string)ComputeModel;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._maintenanceWindow ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._maintenanceWindow.ToJson(null,serializationMode) : null, "maintenanceWindow" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._estimatedPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._estimatedPatchingTime.ToJson(null,serializationMode) : null, "estimatedPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._definedFileSystemConfiguration) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._definedFileSystemConfiguration ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("definedFileSystemConfiguration",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._computeCount) : null, "computeCount" ,container.Add ); + AddIf( null != this._storageCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._storageCount) : null, "storageCount" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._totalStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._totalStorageSizeInGb) : null, "totalStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._availableStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableStorageSizeInGb) : null, "availableStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._timeCreated)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated.ToString()) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (null != this._customerContact) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._customerContact ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("customerContacts",__r); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._cpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._cpuCount) : null, "cpuCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._maxCpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maxCpuCount) : null, "maxCpuCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._maxMemoryInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maxMemoryInGb) : null, "maxMemoryInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._maxDbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maxDbNodeStorageSizeInGb) : null, "maxDbNodeStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._maxDataStorageInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._maxDataStorageInTb) : null, "maxDataStorageInTbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._dbServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbServerVersion.ToString()) : null, "dbServerVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._storageServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._storageServerVersion.ToString()) : null, "storageServerVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._activatedStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._activatedStorageCount) : null, "activatedStorageCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._additionalStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._additionalStorageCount) : null, "additionalStorageCount" ,container.Add ); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lastMaintenanceRunId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lastMaintenanceRunId.ToString()) : null, "lastMaintenanceRunId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nextMaintenanceRunId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextMaintenanceRunId.ToString()) : null, "nextMaintenanceRunId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._monthlyDbServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._monthlyDbServerVersion.ToString()) : null, "monthlyDbServerVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._monthlyStorageServerVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._monthlyStorageServerVersion.ToString()) : null, "monthlyStorageServerVersion" ,container.Add ); + } + AddIf( null != (((object)this._databaseServerType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._databaseServerType.ToString()) : null, "databaseServerType" ,container.Add ); + AddIf( null != (((object)this._storageServerType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._storageServerType.ToString()) : null, "storageServerType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._computeModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._computeModel.ToString()) : null, "computeModel" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.PowerShell.cs new file mode 100644 index 000000000000..8709ec0163ea --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.PowerShell.cs @@ -0,0 +1,282 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The type used for update operations of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTypeConverter))] + public partial class CloudExadataInfrastructureUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The type used for update operations of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTypeConverter))] + public partial interface ICloudExadataInfrastructureUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.TypeConverter.cs new file mode 100644 index 000000000000..720cab2cbc0e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.cs new file mode 100644 index 000000000000..b77a1c3e5d68 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.cs @@ -0,0 +1,356 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal + { + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ComputeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).ComputeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).ComputeCount = value ?? default(int); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).CustomerContact; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).CustomerContact = value ?? null /* arrayOf */; } + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowCustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowDaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowDaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowHoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowHoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowIsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowLeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowMonth = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPatchingMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode)""); } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPreference; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowPreference = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindowWeeksOfMonth = value ?? null /* arrayOf */; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal.MaintenanceWindow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindow; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).MaintenanceWindow = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateProperties()); set => this._property = value; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? StorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).StorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)Property).StorageCount = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateTags()); set => this._tag = value; } + + /// Backing field for property. + private string[] _zone; + + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public CloudExadataInfrastructureUpdate() + { + + } + } + /// The type used for update operations of the CloudExadataInfrastructure. + public partial interface ICloudExadataInfrastructureUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags Tag { get; set; } + /// CloudExadataInfrastructure zones + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + string[] Zone { get; set; } + + } + /// The type used for update operations of the CloudExadataInfrastructure. + internal partial interface ICloudExadataInfrastructureUpdateInternal + + { + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// 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). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties Property { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags Tag { get; set; } + /// CloudExadataInfrastructure zones + string[] Zone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.json.cs new file mode 100644 index 000000000000..47342f7ef9ca --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdate.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateProperties.FromJson(__jsonProperties) : Property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Zone;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..9c96abc22378 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.PowerShell.cs @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The updatable properties of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdatePropertiesTypeConverter))] + public partial class CloudExadataInfrastructureUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MaintenanceWindow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow) content.GetValueForProperty("MaintenanceWindow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindow, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindowTypeConverter.ConvertFrom); + } + if (content.Contains("ComputeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount = (int?) content.GetValueForProperty("ComputeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).ComputeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount = (int?) content.GetValueForProperty("StorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).StorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CustomerContact")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[]) content.GetValueForProperty("CustomerContact",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).CustomerContact, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContactTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceWindowPreference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("MaintenanceWindowPreference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPreference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("MaintenanceWindowMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("MaintenanceWindowMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowMonth, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowPatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("MaintenanceWindowPatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowPatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("MaintenanceWindowWeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth = (int[]) content.GetValueForProperty("MaintenanceWindowWeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowWeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowDaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("MaintenanceWindowDaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowDaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("MaintenanceWindowHoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay = (int[]) content.GetValueForProperty("MaintenanceWindowHoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowHoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("MaintenanceWindowLeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek = (int?) content.GetValueForProperty("MaintenanceWindowLeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowLeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowCustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin = (int?) content.GetValueForProperty("MaintenanceWindowCustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowCustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaintenanceWindowIsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MaintenanceWindowIsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("MaintenanceWindowIsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal)this).MaintenanceWindowIsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a + /// json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The updatable properties of the CloudExadataInfrastructure. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdatePropertiesTypeConverter))] + public partial interface ICloudExadataInfrastructureUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..e82ee8c7af8c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.cs new file mode 100644 index 000000000000..b1b47507959b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.cs @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal + { + + /// Backing field for property. + private int? _computeCount; + + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ComputeCount { get => this._computeCount; set => this._computeCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] _customerContact; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => this._customerContact; set => this._customerContact = value; } + + /// Backing field for property. + private string _displayName; + + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow _maintenanceWindow; + + /// maintenanceWindow property + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow()); set => this._maintenanceWindow = value; } + + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowCustomActionTimeoutInMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).CustomActionTimeoutInMin = value ?? default(int); } + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).DaysOfWeek = value ?? null /* arrayOf */; } + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowHoursOfDay { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).HoursOfDay = value ?? null /* arrayOf */; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsCustomActionTimeoutEnabled = value ?? default(bool); } + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? MaintenanceWindowIsMonthlyPatchingEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).IsMonthlyPatchingEnabled = value ?? default(bool); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaintenanceWindowLeadTimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).LeadTimeInWeek = value ?? default(int); } + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Month; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Month = value ?? null /* arrayOf */; } + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).PatchingMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode)""); } + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Preference; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).Preference = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int[] MaintenanceWindowWeeksOfMonth { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)MaintenanceWindow).WeeksOfMonth = value ?? null /* arrayOf */; } + + /// Internal Acessors for MaintenanceWindow + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdatePropertiesInternal.MaintenanceWindow { get => (this._maintenanceWindow = this._maintenanceWindow ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow()); set { {_maintenanceWindow = value;} } } + + /// Backing field for property. + private int? _storageCount; + + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? StorageCount { get => this._storageCount; set => this._storageCount = value; } + + /// + /// Creates an new instance. + /// + public CloudExadataInfrastructureUpdateProperties() + { + + } + } + /// The updatable properties of the CloudExadataInfrastructure. + public partial interface ICloudExadataInfrastructureUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The number of compute servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + int? ComputeCount { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + int? StorageCount { get; set; } + + } + /// The updatable properties of the CloudExadataInfrastructure. + internal partial interface ICloudExadataInfrastructureUpdatePropertiesInternal + + { + /// The number of compute servers for the cloud Exadata infrastructure. + int? ComputeCount { get; set; } + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get; set; } + /// The name for the Exadata infrastructure. + string DisplayName { get; set; } + /// maintenanceWindow property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow MaintenanceWindow { get; set; } + /// + /// 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). + /// + int? MaintenanceWindowCustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get; set; } + /// + /// 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 + /// + int[] MaintenanceWindowHoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? MaintenanceWindowIsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? MaintenanceWindowIsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + int? MaintenanceWindowLeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get; set; } + /// Cloud Exadata infrastructure node patching method. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? MaintenanceWindowPatchingMode { get; set; } + /// The maintenance window scheduling preference. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? MaintenanceWindowPreference { get; set; } + /// + /// 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. + /// + int[] MaintenanceWindowWeeksOfMonth { get; set; } + /// The number of storage servers for the cloud Exadata infrastructure. + int? StorageCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.json.cs new file mode 100644 index 000000000000..f79b2c6d68b6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateProperties.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the CloudExadataInfrastructure. + public partial class CloudExadataInfrastructureUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructureUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_maintenanceWindow = If( json?.PropertyT("maintenanceWindow"), out var __jsonMaintenanceWindow) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MaintenanceWindow.FromJson(__jsonMaintenanceWindow) : MaintenanceWindow;} + {_computeCount = If( json?.PropertyT("computeCount"), out var __jsonComputeCount) ? (int?)__jsonComputeCount : ComputeCount;} + {_storageCount = If( json?.PropertyT("storageCount"), out var __jsonStorageCount) ? (int?)__jsonStorageCount : StorageCount;} + {_customerContact = If( json?.PropertyT("customerContacts"), out var __jsonCustomerContacts) ? If( __jsonCustomerContacts as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CustomerContact.FromJson(__u) )) ))() : null : CustomerContact;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._maintenanceWindow ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._maintenanceWindow.ToJson(null,serializationMode) : null, "maintenanceWindow" ,container.Add ); + AddIf( null != this._computeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._computeCount) : null, "computeCount" ,container.Add ); + AddIf( null != this._storageCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._storageCount) : null, "storageCount" ,container.Add ); + if (null != this._customerContact) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._customerContact ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("customerContacts",__w); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..fc71f8b6d86e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.PowerShell.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTagsTypeConverter))] + public partial class CloudExadataInfrastructureUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructureUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructureUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructureUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructureUpdateTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructureUpdateTagsTypeConverter))] + public partial interface ICloudExadataInfrastructureUpdateTags + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..a4a9ae992b82 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructureUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructureUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructureUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.cs new file mode 100644 index 000000000000..8e4ac7c5621f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class CloudExadataInfrastructureUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTagsInternal + { + + /// Creates an new instance. + public CloudExadataInfrastructureUpdateTags() + { + + } + } + /// Resource tags. + public partial interface ICloudExadataInfrastructureUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ICloudExadataInfrastructureUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.dictionary.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.dictionary.cs new file mode 100644 index 000000000000..e61d990a4d82 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudExadataInfrastructureUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.json.cs new file mode 100644 index 000000000000..fd9004576c2a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudExadataInfrastructureUpdateTags.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class CloudExadataInfrastructureUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + /// + internal CloudExadataInfrastructureUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructureUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.PowerShell.cs new file mode 100644 index 000000000000..f7b4d99ca1bc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.PowerShell.cs @@ -0,0 +1,714 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// CloudVmCluster resource definition + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterTypeConverter))] + public partial class CloudVMCluster + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMCluster(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DiskRedundancy = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy?) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DiskRedundancy, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy.CreateFrom); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbServer = (string[]) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMCluster(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DiskRedundancy = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy?) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DiskRedundancy, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy.CreateFrom); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbServer = (string[]) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DbServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMCluster(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMCluster(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// CloudVmCluster resource definition + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterTypeConverter))] + public partial interface ICloudVMCluster + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.TypeConverter.cs new file mode 100644 index 000000000000..9ab25211e196 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMCluster.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMCluster.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMCluster.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.cs new file mode 100644 index 000000000000..927ff72dbae1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.cs @@ -0,0 +1,1149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudVmCluster resource definition + public partial class CloudVMCluster : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(); + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string BackupSubnetCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).BackupSubnetCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).BackupSubnetCidr = value ?? null; } + + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string CloudExadataInfrastructureId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).CloudExadataInfrastructureId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).CloudExadataInfrastructureId = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ClusterName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ClusterName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ClusterName = value ?? null; } + + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).CompartmentId; } + + /// The compute model of the VM Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ComputeModel; } + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] ComputeNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ComputeNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ComputeNode = value ?? null /* arrayOf */; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled = value ?? default(bool); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DataStoragePercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataStoragePercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataStoragePercentage = value ?? default(int); } + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataStorageSizeInTb = value ?? default(double); } + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DbNodeStorageSizeInGb = value ?? default(int); } + + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] DbServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DbServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DbServer = value ?? null /* arrayOf */; } + + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? DiskRedundancy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DiskRedundancy; } + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DisplayName = value ?? null; } + + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Domain { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Domain; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Domain = value ?? null; } + + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).FileSystemConfigurationDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).FileSystemConfigurationDetail = value ?? null /* arrayOf */; } + + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string GiVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).GiVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).GiVersion = value ?? null; } + + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Hostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Hostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Hostname = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; } + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheDbPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheDbPlan = value ?? null /* arrayOf */; } + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleDetail = value ?? null; } + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState)""); } + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheObjective; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCacheObjective = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsLocalBackupEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IsLocalBackupEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IsLocalBackupEnabled = value ?? default(bool); } + + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsSparseDiskgroupEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IsSparseDiskgroupEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IsSparseDiskgroupEnabled = value ?? default(bool); } + + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LastUpdateHistoryEntryId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LastUpdateHistoryEntryId; } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LifecycleDetail; } + + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LifecycleState; } + + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public long? ListenerPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ListenerPort; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).MemorySizeInGb = value ?? default(int); } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).CompartmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).CompartmentId = value; } + + /// Internal Acessors for ComputeModel + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ComputeModel = value; } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.DataCollectionOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DataCollectionOption = value; } + + /// Internal Acessors for DiskRedundancy + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.DiskRedundancy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DiskRedundancy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).DiskRedundancy = value; } + + /// Internal Acessors for IormConfigCache + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.IormConfigCache { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCache; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).IormConfigCache = value; } + + /// Internal Acessors for LastUpdateHistoryEntryId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.LastUpdateHistoryEntryId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LastUpdateHistoryEntryId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LastUpdateHistoryEntryId = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for ListenerPort + long? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.ListenerPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ListenerPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ListenerPort = value; } + + /// Internal Acessors for NodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.NodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NodeCount = value; } + + /// Internal Acessors for NsgUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.NsgUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NsgUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NsgUrl = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ScanDnsName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.ScanDnsName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanDnsName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanDnsName = value; } + + /// Internal Acessors for ScanDnsRecordId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.ScanDnsRecordId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanDnsRecordId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanDnsRecordId = value; } + + /// Internal Acessors for ScanIPId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.ScanIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanIPId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanIPId = value; } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Shape = value; } + + /// Internal Acessors for SubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.SubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SubnetOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SubnetOcid = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for VipId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal.VipId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).VipId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).VipId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; } + + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? NodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NodeCount; } + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NsgCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NsgCidr = value ?? null /* arrayOf */; } + + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string NsgUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).NsgUrl; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).OciUrl; } + + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Ocid; } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public float? OcpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).OcpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).OcpuCount = value ?? default(float); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterProperties()); set => this._property = value; } + + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ProvisioningState; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScanDnsName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanDnsName; } + + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScanDnsRecordId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanDnsRecordId; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] ScanIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanIPId; } + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ScanListenerPortTcp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcp; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcp = value ?? default(int); } + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ScanListenerPortTcpSsl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcpSsl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ScanListenerPortTcpSsl = value ?? default(int); } + + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).Shape; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? StorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).StorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).StorageSizeInGb = value ?? default(int); } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SubnetId = value ?? null; } + + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SubnetOcid; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SystemVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SystemVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).SystemVersion = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).TimeCreated; } + + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).TimeZone = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] VipId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).VipId; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).VnetId = value ?? null; } + + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ZoneId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ZoneId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)Property).ZoneId = value ?? null; } + + /// Creates an new instance. + public CloudVMCluster() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// CloudVmCluster resource definition + public partial interface ICloudVMCluster : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata Infrastructure ID", + SerializedName = @"cloudExadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string CloudExadataInfrastructureId { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + string ClusterName { get; set; } + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster compartmentId", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The compute model of the VM Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the VM Cluster.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; } + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"dataStoragePercentage", + PossibleTypes = new [] { typeof(int) })] + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of DB servers.", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + string[] DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. ", + SerializedName = @"diskRedundancy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? DiskRedundancy { get; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The domain name for the cloud VM cluster.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; set; } + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of mount path and size.", + SerializedName = @"fileSystemConfigurationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The hostname for the cloud VM cluster.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"isLocalBackupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ", + SerializedName = @"isSparseDiskgroupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the last maintenance update history entry.", + SerializedName = @"lastUpdateHistoryEntryId", + PossibleTypes = new [] { typeof(string) })] + string LastUpdateHistoryEntryId { get; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudVmCluster lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? LifecycleState { get; } + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The port number configured for the listener on the cloud VM cluster.", + SerializedName = @"listenerPort", + PossibleTypes = new [] { typeof(long) })] + long? ListenerPort { get; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of nodes in the cloud VM cluster. ", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int? NodeCount { get; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface.", + SerializedName = @"nsgUrl", + PossibleTypes = new [] { typeof(string) })] + string NsgUrl { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud VM Cluster ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudVmCluster provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. ", + SerializedName = @"scanDnsName", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsName { get; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster.", + SerializedName = @"scanDnsRecordId", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsRecordId { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"scanIpIds", + PossibleTypes = new [] { typeof(string) })] + string[] ScanIPId { get; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The model name of the Exadata hardware running the cloud VM cluster.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster subnet ocid", + SerializedName = @"subnetOcid", + PossibleTypes = new [] { typeof(string) })] + string SubnetOcid { get; } + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time that the cloud VM cluster was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"vipIds", + PossibleTypes = new [] { typeof(string) })] + string[] VipId { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the zone the cloud VM cluster is associated with.", + SerializedName = @"zoneId", + PossibleTypes = new [] { typeof(string) })] + string ZoneId { get; set; } + + } + /// CloudVmCluster resource definition + internal partial interface ICloudVMClusterInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal + { + string AzureAsyncOperation { get; set; } + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + string CloudExadataInfrastructureId { get; set; } + /// + /// 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. + /// + string ClusterName { get; set; } + /// Cluster compartmentId + string CompartmentId { get; set; } + /// The compute model of the VM Cluster. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The list of compute servers to be added to the cloud VM cluster. + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int? CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// 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. + /// + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + string[] DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? DiskRedundancy { get; set; } + /// Display Name + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + string Domain { get; set; } + /// Array of mount path and size. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// Oracle Grid Infrastructure (GI) software version + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + string Hostname { get; set; } + /// iormConfigCache details for cloud VM cluster. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig IormConfigCache { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// 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. + /// + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + string LastUpdateHistoryEntryId { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudVmCluster lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? LifecycleState { get; set; } + /// The port number configured for the listener on the cloud VM cluster. + long? ListenerPort { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + int? NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + string NsgUrl { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Cloud VM Cluster ocid + string Ocid { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties Property { get; set; } + /// CloudVmCluster provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + + int? RetryAfter { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsName { get; set; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsRecordId { get; set; } + /// + /// 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. + /// + string[] ScanIPId { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + string Shape { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// Cluster subnet ocid + string SubnetOcid { get; set; } + /// Operating system version of the image. + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + string TimeZone { get; set; } + /// + /// 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. + /// + string[] VipId { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + string ZoneId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.json.cs new file mode 100644 index 000000000000..242207f2430a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMCluster.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudVmCluster resource definition + public partial class CloudVMCluster + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMCluster(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMCluster(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.PowerShell.cs new file mode 100644 index 000000000000..1dc7af0a3de2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a CloudVmCluster list operation. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterListResultTypeConverter))] + public partial class CloudVMClusterListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a CloudVmCluster list operation. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterListResultTypeConverter))] + public partial interface ICloudVMClusterListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.TypeConverter.cs new file mode 100644 index 000000000000..d0dfdefff7bb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.cs new file mode 100644 index 000000000000..57132406109d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a CloudVmCluster list operation. + public partial class CloudVMClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster[] _value; + + /// The CloudVmCluster items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public CloudVMClusterListResult() + { + + } + } + /// The response of a CloudVmCluster list operation. + public partial interface ICloudVMClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The CloudVmCluster items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The CloudVmCluster items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster[] Value { get; set; } + + } + /// The response of a CloudVmCluster list operation. + internal partial interface ICloudVMClusterListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The CloudVmCluster items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.json.cs new file mode 100644 index 000000000000..be80054ce4fe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a CloudVmCluster list operation. + public partial class CloudVMClusterListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClusterListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.PowerShell.cs new file mode 100644 index 000000000000..6221547d4997 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.PowerShell.cs @@ -0,0 +1,594 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// CloudVmCluster resource model + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterPropertiesTypeConverter))] + public partial class CloudVMClusterProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DiskRedundancy = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy?) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DiskRedundancy, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy.CreateFrom); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbServer = (string[]) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ListenerPort = (long?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ListenerPort, (__y)=> (long) global::System.Convert.ChangeType(__y, typeof(long))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ZoneId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ZoneId = (string) content.GetValueForProperty("ZoneId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ZoneId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CpuCoreCount = (int) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("DataStoragePercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage = (int?) content.GetValueForProperty("DataStoragePercentage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataStoragePercentage, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsLocalBackupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled = (bool?) content.GetValueForProperty("IsLocalBackupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsLocalBackupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CloudExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId = (string) content.GetValueForProperty("CloudExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CloudExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("IsSparseDiskgroupEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled = (bool?) content.GetValueForProperty("IsSparseDiskgroupEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IsSparseDiskgroupEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DiskRedundancy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DiskRedundancy = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy?) content.GetValueForProperty("DiskRedundancy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DiskRedundancy, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy.CreateFrom); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LastUpdateHistoryEntryId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId = (string) content.GetValueForProperty("LastUpdateHistoryEntryId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).LastUpdateHistoryEntryId, global::System.Convert.ToString); + } + if (content.Contains("DbServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbServer = (string[]) content.GetValueForProperty("DbServer",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DbServer, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// CloudVmCluster resource model + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterPropertiesTypeConverter))] + public partial interface ICloudVMClusterProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.TypeConverter.cs new file mode 100644 index 000000000000..8dfb72b9134f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.cs new file mode 100644 index 000000000000..afc9bae71b94 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.cs @@ -0,0 +1,1168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudVmCluster resource model + public partial class CloudVMClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal + { + + /// Backing field for property. + private string _backupSubnetCidr; + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string BackupSubnetCidr { get => this._backupSubnetCidr; set => this._backupSubnetCidr = value; } + + /// Backing field for property. + private string _cloudExadataInfrastructureId; + + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CloudExadataInfrastructureId { get => this._cloudExadataInfrastructureId; set => this._cloudExadataInfrastructureId = value; } + + /// Backing field for property. + private string _clusterName; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private string _compartmentId; + + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CompartmentId { get => this._compartmentId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? _computeModel; + + /// The compute model of the VM Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => this._computeModel; } + + /// Backing field for property. + private string[] _computeNode; + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] ComputeNode { get => this._computeNode; set => this._computeNode = value; } + + /// Backing field for property. + private int _cpuCoreCount; + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions _dataCollectionOption; + + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions()); set => this._dataCollectionOption = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled = value ?? default(bool); } + + /// Backing field for property. + private int? _dataStoragePercentage; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DataStoragePercentage { get => this._dataStoragePercentage; set => this._dataStoragePercentage = value; } + + /// Backing field for property. + private double? _dataStorageSizeInTb; + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set => this._dbNodeStorageSizeInGb = value; } + + /// Backing field for property. + private string[] _dbServer; + + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] DbServer { get => this._dbServer; set => this._dbServer = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? _diskRedundancy; + + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? DiskRedundancy { get => this._diskRedundancy; } + + /// Backing field for property. + private string _displayName; + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _domain; + + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Domain { get => this._domain; set => this._domain = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] _fileSystemConfigurationDetail; + + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get => this._fileSystemConfigurationDetail; set => this._fileSystemConfigurationDetail = value; } + + /// Backing field for property. + private string _giVersion; + + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string GiVersion { get => this._giVersion; set => this._giVersion = value; } + + /// Backing field for property. + private string _hostname; + + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Hostname { get => this._hostname; set => this._hostname = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig _iormConfigCache; + + /// iormConfigCache details for cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig IormConfigCache { get => (this._iormConfigCache = this._iormConfigCache ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig()); } + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).DbPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).DbPlan = value ?? null /* arrayOf */; } + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleDetail = value ?? null; } + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState)""); } + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).Objective; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).Objective = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective)""); } + + /// Backing field for property. + private bool? _isLocalBackupEnabled; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsLocalBackupEnabled { get => this._isLocalBackupEnabled; set => this._isLocalBackupEnabled = value; } + + /// Backing field for property. + private bool? _isSparseDiskgroupEnabled; + + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsSparseDiskgroupEnabled { get => this._isSparseDiskgroupEnabled; set => this._isSparseDiskgroupEnabled = value; } + + /// Backing field for property. + private string _lastUpdateHistoryEntryId; + + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LastUpdateHistoryEntryId { get => this._lastUpdateHistoryEntryId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? _licenseModel; + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? _lifecycleState; + + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private long? _listenerPort; + + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public long? ListenerPort { get => this._listenerPort; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; set => this._memorySizeInGb = value; } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.CompartmentId { get => this._compartmentId; set { {_compartmentId = value;} } } + + /// Internal Acessors for ComputeModel + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.ComputeModel { get => this._computeModel; set { {_computeModel = value;} } } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions()); set { {_dataCollectionOption = value;} } } + + /// Internal Acessors for DiskRedundancy + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.DiskRedundancy { get => this._diskRedundancy; set { {_diskRedundancy = value;} } } + + /// Internal Acessors for IormConfigCache + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.IormConfigCache { get => (this._iormConfigCache = this._iormConfigCache ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig()); set { {_iormConfigCache = value;} } } + + /// Internal Acessors for LastUpdateHistoryEntryId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.LastUpdateHistoryEntryId { get => this._lastUpdateHistoryEntryId; set { {_lastUpdateHistoryEntryId = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for ListenerPort + long? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.ListenerPort { get => this._listenerPort; set { {_listenerPort = value;} } } + + /// Internal Acessors for NodeCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.NodeCount { get => this._nodeCount; set { {_nodeCount = value;} } } + + /// Internal Acessors for NsgUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.NsgUrl { get => this._nsgUrl; set { {_nsgUrl = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ScanDnsName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.ScanDnsName { get => this._scanDnsName; set { {_scanDnsName = value;} } } + + /// Internal Acessors for ScanDnsRecordId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.ScanDnsRecordId { get => this._scanDnsRecordId; set { {_scanDnsRecordId = value;} } } + + /// Internal Acessors for ScanIPId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.ScanIPId { get => this._scanIPId; set { {_scanIPId = value;} } } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.Shape { get => this._shape; set { {_shape = value;} } } + + /// Internal Acessors for SubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.SubnetOcid { get => this._subnetOcid; set { {_subnetOcid = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for VipId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterPropertiesInternal.VipId { get => this._vipId; set { {_vipId = value;} } } + + /// Backing field for property. + private int? _nodeCount; + + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? NodeCount { get => this._nodeCount; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] _nsgCidr; + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get => this._nsgCidr; set => this._nsgCidr = value; } + + /// Backing field for property. + private string _nsgUrl; + + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NsgUrl { get => this._nsgUrl; } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private float? _ocpuCount; + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public float? OcpuCount { get => this._ocpuCount; set => this._ocpuCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _scanDnsName; + + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScanDnsName { get => this._scanDnsName; } + + /// Backing field for property. + private string _scanDnsRecordId; + + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScanDnsRecordId { get => this._scanDnsRecordId; } + + /// Backing field for property. + private string[] _scanIPId; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] ScanIPId { get => this._scanIPId; } + + /// Backing field for property. + private int? _scanListenerPortTcp; + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ScanListenerPortTcp { get => this._scanListenerPortTcp; set => this._scanListenerPortTcp = value; } + + /// Backing field for property. + private int? _scanListenerPortTcpSsl; + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ScanListenerPortTcpSsl { get => this._scanListenerPortTcpSsl; set => this._scanListenerPortTcpSsl = value; } + + /// Backing field for property. + private string _shape; + + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Shape { get => this._shape; } + + /// Backing field for property. + private string[] _sshPublicKey; + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] SshPublicKey { get => this._sshPublicKey; set => this._sshPublicKey = value; } + + /// Backing field for property. + private int? _storageSizeInGb; + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? StorageSizeInGb { get => this._storageSizeInGb; set => this._storageSizeInGb = value; } + + /// Backing field for property. + private string _subnetId; + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private string _subnetOcid; + + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubnetOcid { get => this._subnetOcid; } + + /// Backing field for property. + private string _systemVersion; + + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SystemVersion { get => this._systemVersion; set => this._systemVersion = value; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private string _timeZone; + + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Backing field for property. + private string[] _vipId; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] VipId { get => this._vipId; } + + /// Backing field for property. + private string _vnetId; + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string VnetId { get => this._vnetId; set => this._vnetId = value; } + + /// Backing field for property. + private string _zoneId; + + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ZoneId { get => this._zoneId; set => this._zoneId = value; } + + /// Creates an new instance. + public CloudVMClusterProperties() + { + + } + } + /// CloudVmCluster resource model + public partial interface ICloudVMClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Cloud Exadata Infrastructure ID", + SerializedName = @"cloudExadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string CloudExadataInfrastructureId { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + string ClusterName { get; set; } + /// Cluster compartmentId + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster compartmentId", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The compute model of the VM Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the VM Cluster.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; } + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"dataStoragePercentage", + PossibleTypes = new [] { typeof(int) })] + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of DB servers.", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + string[] DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. ", + SerializedName = @"diskRedundancy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? DiskRedundancy { get; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The domain name for the cloud VM cluster.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; set; } + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of mount path and size.", + SerializedName = @"fileSystemConfigurationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The hostname for the cloud VM cluster.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"isLocalBackupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ", + SerializedName = @"isSparseDiskgroupEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the last maintenance update history entry.", + SerializedName = @"lastUpdateHistoryEntryId", + PossibleTypes = new [] { typeof(string) })] + string LastUpdateHistoryEntryId { get; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudVmCluster lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? LifecycleState { get; } + /// The port number configured for the listener on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The port number configured for the listener on the cloud VM cluster.", + SerializedName = @"listenerPort", + PossibleTypes = new [] { typeof(long) })] + long? ListenerPort { get; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of nodes in the cloud VM cluster. ", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int? NodeCount { get; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface.", + SerializedName = @"nsgUrl", + PossibleTypes = new [] { typeof(string) })] + string NsgUrl { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// Cloud VM Cluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud VM Cluster ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// CloudVmCluster provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudVmCluster provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. ", + SerializedName = @"scanDnsName", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsName { get; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster.", + SerializedName = @"scanDnsRecordId", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsRecordId { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"scanIpIds", + PossibleTypes = new [] { typeof(string) })] + string[] ScanIPId { get; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The model name of the Exadata hardware running the cloud VM cluster.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster subnet ocid", + SerializedName = @"subnetOcid", + PossibleTypes = new [] { typeof(string) })] + string SubnetOcid { get; } + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time that the cloud VM cluster was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"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.", + SerializedName = @"vipIds", + PossibleTypes = new [] { typeof(string) })] + string[] VipId { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the zone the cloud VM cluster is associated with.", + SerializedName = @"zoneId", + PossibleTypes = new [] { typeof(string) })] + string ZoneId { get; set; } + + } + /// CloudVmCluster resource model + internal partial interface ICloudVMClusterPropertiesInternal + + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + string BackupSubnetCidr { get; set; } + /// Cloud Exadata Infrastructure ID + string CloudExadataInfrastructureId { get; set; } + /// + /// 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. + /// + string ClusterName { get; set; } + /// Cluster compartmentId + string CompartmentId { get; set; } + /// The compute model of the VM Cluster. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The list of compute servers to be added to the cloud VM cluster. + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// + /// 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. + /// + int? DataStoragePercentage { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// The list of DB servers. + string[] DbServer { get; set; } + /// + /// The type of redundancy configured for the cloud Vm cluster. NORMAL is 2-way redundancy. HIGH is 3-way redundancy. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy? DiskRedundancy { get; set; } + /// Display Name + string DisplayName { get; set; } + /// The domain name for the cloud VM cluster. + string Domain { get; set; } + /// Array of mount path and size. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// Oracle Grid Infrastructure (GI) software version + string GiVersion { get; set; } + /// The hostname for the cloud VM cluster. + string Hostname { get; set; } + /// iormConfigCache details for cloud VM cluster. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig IormConfigCache { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// 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. + /// + bool? IsLocalBackupEnabled { get; set; } + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + bool? IsSparseDiskgroupEnabled { get; set; } + /// The OCID of the last maintenance update history entry. + string LastUpdateHistoryEntryId { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudVmCluster lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState? LifecycleState { get; set; } + /// The port number configured for the listener on the cloud VM cluster. + long? ListenerPort { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// The number of nodes in the cloud VM cluster. + int? NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + string NsgUrl { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// Cloud VM Cluster ocid + string Ocid { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// CloudVmCluster provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsName { get; set; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the cloud VM cluster. + /// + string ScanDnsRecordId { get; set; } + /// + /// 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. + /// + string[] ScanIPId { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + int? ScanListenerPortTcpSsl { get; set; } + /// The model name of the Exadata hardware running the cloud VM cluster. + string Shape { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// Cluster subnet ocid + string SubnetOcid { get; set; } + /// Operating system version of the image. + string SystemVersion { get; set; } + /// The date and time that the cloud VM cluster was created. + global::System.DateTime? TimeCreated { get; set; } + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + string TimeZone { get; set; } + /// + /// 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. + /// + string[] VipId { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// The OCID of the zone the cloud VM cluster is associated with. + string ZoneId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.json.cs new file mode 100644 index 000000000000..13a1811aae07 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterProperties.json.cs @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CloudVmCluster resource model + public partial class CloudVMClusterProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dataCollectionOption = If( json?.PropertyT("dataCollectionOptions"), out var __jsonDataCollectionOptions) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions.FromJson(__jsonDataCollectionOptions) : DataCollectionOption;} + {_iormConfigCache = If( json?.PropertyT("iormConfigCache"), out var __jsonIormConfigCache) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig.FromJson(__jsonIormConfigCache) : IormConfigCache;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_listenerPort = If( json?.PropertyT("listenerPort"), out var __jsonListenerPort) ? (long?)__jsonListenerPort : ListenerPort;} + {_nodeCount = If( json?.PropertyT("nodeCount"), out var __jsonNodeCount) ? (int?)__jsonNodeCount : NodeCount;} + {_storageSizeInGb = If( json?.PropertyT("storageSizeInGbs"), out var __jsonStorageSizeInGbs) ? (int?)__jsonStorageSizeInGbs : StorageSizeInGb;} + {_fileSystemConfigurationDetail = If( json?.PropertyT("fileSystemConfigurationDetails"), out var __jsonFileSystemConfigurationDetails) ? If( __jsonFileSystemConfigurationDetails as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetails.FromJson(__u) )) ))() : null : FileSystemConfigurationDetail;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (double?)__jsonDataStorageSizeInTbs : DataStorageSizeInTb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : DbNodeStorageSizeInGb;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : MemorySizeInGb;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : TimeCreated : TimeCreated;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_zoneId = If( json?.PropertyT("zoneId"), out var __jsonZoneId) ? (string)__jsonZoneId : (string)ZoneId;} + {_hostname = If( json?.PropertyT("hostname"), out var __jsonHostname) ? (string)__jsonHostname : (string)Hostname;} + {_domain = If( json?.PropertyT("domain"), out var __jsonDomain) ? (string)__jsonDomain : (string)Domain;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int)__jsonCpuCoreCount : CpuCoreCount;} + {_ocpuCount = If( json?.PropertyT("ocpuCount"), out var __jsonOcpuCount) ? (float?)__jsonOcpuCount : OcpuCount;} + {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;} + {_dataStoragePercentage = If( json?.PropertyT("dataStoragePercentage"), out var __jsonDataStoragePercentage) ? (int?)__jsonDataStoragePercentage : DataStoragePercentage;} + {_isLocalBackupEnabled = If( json?.PropertyT("isLocalBackupEnabled"), out var __jsonIsLocalBackupEnabled) ? (bool?)__jsonIsLocalBackupEnabled : IsLocalBackupEnabled;} + {_cloudExadataInfrastructureId = If( json?.PropertyT("cloudExadataInfrastructureId"), out var __jsonCloudExadataInfrastructureId) ? (string)__jsonCloudExadataInfrastructureId : (string)CloudExadataInfrastructureId;} + {_isSparseDiskgroupEnabled = If( json?.PropertyT("isSparseDiskgroupEnabled"), out var __jsonIsSparseDiskgroupEnabled) ? (bool?)__jsonIsSparseDiskgroupEnabled : IsSparseDiskgroupEnabled;} + {_systemVersion = If( json?.PropertyT("systemVersion"), out var __jsonSystemVersion) ? (string)__jsonSystemVersion : (string)SystemVersion;} + {_sshPublicKey = If( json?.PropertyT("sshPublicKeys"), out var __jsonSshPublicKeys) ? If( __jsonSshPublicKeys as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : SshPublicKey;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)LicenseModel;} + {_diskRedundancy = If( json?.PropertyT("diskRedundancy"), out var __jsonDiskRedundancy) ? (string)__jsonDiskRedundancy : (string)DiskRedundancy;} + {_scanIPId = If( json?.PropertyT("scanIpIds"), out var __jsonScanIPIds) ? If( __jsonScanIPIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : ScanIPId;} + {_vipId = If( json?.PropertyT("vipIds"), out var __jsonVipIds) ? If( __jsonVipIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : VipId;} + {_scanDnsName = If( json?.PropertyT("scanDnsName"), out var __jsonScanDnsName) ? (string)__jsonScanDnsName : (string)ScanDnsName;} + {_scanListenerPortTcp = If( json?.PropertyT("scanListenerPortTcp"), out var __jsonScanListenerPortTcp) ? (int?)__jsonScanListenerPortTcp : ScanListenerPortTcp;} + {_scanListenerPortTcpSsl = If( json?.PropertyT("scanListenerPortTcpSsl"), out var __jsonScanListenerPortTcpSsl) ? (int?)__jsonScanListenerPortTcpSsl : ScanListenerPortTcpSsl;} + {_scanDnsRecordId = If( json?.PropertyT("scanDnsRecordId"), out var __jsonScanDnsRecordId) ? (string)__jsonScanDnsRecordId : (string)ScanDnsRecordId;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)Shape;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_vnetId = If( json?.PropertyT("vnetId"), out var __jsonVnetId) ? (string)__jsonVnetId : (string)VnetId;} + {_giVersion = If( json?.PropertyT("giVersion"), out var __jsonGiVersion) ? (string)__jsonGiVersion : (string)GiVersion;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)OciUrl;} + {_nsgUrl = If( json?.PropertyT("nsgUrl"), out var __jsonNsgUrl) ? (string)__jsonNsgUrl : (string)NsgUrl;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId;} + {_backupSubnetCidr = If( json?.PropertyT("backupSubnetCidr"), out var __jsonBackupSubnetCidr) ? (string)__jsonBackupSubnetCidr : (string)BackupSubnetCidr;} + {_nsgCidr = If( json?.PropertyT("nsgCidrs"), out var __jsonNsgCidrs) ? If( __jsonNsgCidrs as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __b) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__b, (__a)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidr.FromJson(__a) )) ))() : null : NsgCidr;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_computeNode = If( json?.PropertyT("computeNodes"), out var __jsonComputeNodes) ? If( __jsonComputeNodes as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var ___w) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(___w, (___v)=>(string) (___v is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString ___u ? (string)(___u.ToString()) : null)) ))() : null : ComputeNode;} + {_lastUpdateHistoryEntryId = If( json?.PropertyT("lastUpdateHistoryEntryId"), out var __jsonLastUpdateHistoryEntryId) ? (string)__jsonLastUpdateHistoryEntryId : (string)LastUpdateHistoryEntryId;} + {_dbServer = If( json?.PropertyT("dbServers"), out var __jsonDbServers) ? If( __jsonDbServers as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var ___r) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(___r, (___q)=>(string) (___q is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString ___p ? (string)(___p.ToString()) : null)) ))() : null : DbServer;} + {_compartmentId = If( json?.PropertyT("compartmentId"), out var __jsonCompartmentId) ? (string)__jsonCompartmentId : (string)CompartmentId;} + {_subnetOcid = If( json?.PropertyT("subnetOcid"), out var __jsonSubnetOcid) ? (string)__jsonSubnetOcid : (string)SubnetOcid;} + {_computeModel = If( json?.PropertyT("computeModel"), out var __jsonComputeModel) ? (string)__jsonComputeModel : (string)ComputeModel;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClusterProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dataCollectionOption ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._dataCollectionOption.ToJson(null,serializationMode) : null, "dataCollectionOptions" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._iormConfigCache ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._iormConfigCache.ToJson(null,serializationMode) : null, "iormConfigCache" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._listenerPort ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((long)this._listenerPort) : null, "listenerPort" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._nodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._nodeCount) : null, "nodeCount" ,container.Add ); + } + AddIf( null != this._storageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._storageSizeInGb) : null, "storageSizeInGbs" ,container.Add ); + if (null != this._fileSystemConfigurationDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._fileSystemConfigurationDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("fileSystemConfigurationDetails",__w); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AddIf( null != (((object)this._zoneId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._zoneId.ToString()) : null, "zoneId" ,container.Add ); + AddIf( null != (((object)this._hostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hostname.ToString()) : null, "hostname" ,container.Add ); + AddIf( null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._cpuCoreCount), "cpuCoreCount" ,container.Add ); + AddIf( null != this._ocpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((float)this._ocpuCount) : null, "ocpuCount" ,container.Add ); + AddIf( null != (((object)this._clusterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._clusterName.ToString()) : null, "clusterName" ,container.Add ); + AddIf( null != this._dataStoragePercentage ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dataStoragePercentage) : null, "dataStoragePercentage" ,container.Add ); + AddIf( null != this._isLocalBackupEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isLocalBackupEnabled) : null, "isLocalBackupEnabled" ,container.Add ); + AddIf( null != (((object)this._cloudExadataInfrastructureId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloudExadataInfrastructureId.ToString()) : null, "cloudExadataInfrastructureId" ,container.Add ); + AddIf( null != this._isSparseDiskgroupEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isSparseDiskgroupEnabled) : null, "isSparseDiskgroupEnabled" ,container.Add ); + AddIf( null != (((object)this._systemVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._systemVersion.ToString()) : null, "systemVersion" ,container.Add ); + if (null != this._sshPublicKey) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._sshPublicKey ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("sshPublicKeys",__r); + } + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._diskRedundancy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._diskRedundancy.ToString()) : null, "diskRedundancy" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._scanIPId) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __n in this._scanIPId ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("scanIpIds",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._vipId) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __i in this._vipId ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("vipIds",__h); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._scanDnsName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scanDnsName.ToString()) : null, "scanDnsName" ,container.Add ); + } + AddIf( null != this._scanListenerPortTcp ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._scanListenerPortTcp) : null, "scanListenerPortTcp" ,container.Add ); + AddIf( null != this._scanListenerPortTcpSsl ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._scanListenerPortTcpSsl) : null, "scanListenerPortTcpSsl" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._scanDnsRecordId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scanDnsRecordId.ToString()) : null, "scanDnsRecordId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + AddIf( null != (((object)this._vnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._vnetId.ToString()) : null, "vnetId" ,container.Add ); + AddIf( null != (((object)this._giVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._giVersion.ToString()) : null, "giVersion" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nsgUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nsgUrl.ToString()) : null, "nsgUrl" ,container.Add ); + } + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AddIf( null != (((object)this._backupSubnetCidr)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._backupSubnetCidr.ToString()) : null, "backupSubnetCidr" ,container.Add ); + if (null != this._nsgCidr) + { + var __c = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __d in this._nsgCidr ) + { + AddIf(__d?.ToJson(null, serializationMode) ,__c.Add); + } + container.Add("nsgCidrs",__c); + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (null != this._computeNode) + { + var ___x = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var ___y in this._computeNode ) + { + AddIf(null != (((object)___y)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(___y.ToString()) : null ,___x.Add); + } + container.Add("computeNodes",___x); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lastUpdateHistoryEntryId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lastUpdateHistoryEntryId.ToString()) : null, "lastUpdateHistoryEntryId" ,container.Add ); + } + if (null != this._dbServer) + { + var ___s = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var ___t in this._dbServer ) + { + AddIf(null != (((object)___t)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(___t.ToString()) : null ,___s.Add); + } + container.Add("dbServers",___s); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._compartmentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._compartmentId.ToString()) : null, "compartmentId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._subnetOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subnetOcid.ToString()) : null, "subnetOcid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._computeModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._computeModel.ToString()) : null, "computeModel" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.PowerShell.cs new file mode 100644 index 000000000000..a94593d53de0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.PowerShell.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The type used for update operations of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTypeConverter))] + public partial class CloudVMClusterUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The type used for update operations of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTypeConverter))] + public partial interface ICloudVMClusterUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.TypeConverter.cs new file mode 100644 index 000000000000..d42476754050 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.cs new file mode 100644 index 000000000000..af8faf3556f7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.cs @@ -0,0 +1,302 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the CloudVmCluster. + public partial class CloudVMClusterUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal + { + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] ComputeNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).ComputeNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).ComputeNode = value ?? null /* arrayOf */; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled = value ?? default(bool); } + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? DataStorageSizeInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataStorageSizeInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataStorageSizeInTb = value ?? default(double); } + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DbNodeStorageSizeInGb = value ?? default(int); } + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DisplayName = value ?? null; } + + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).FileSystemConfigurationDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).FileSystemConfigurationDetail = value ?? null /* arrayOf */; } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).MemorySizeInGb = value ?? default(int); } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal.DataCollectionOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).DataCollectionOption = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateProperties()); set { {_property = value;} } } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public float? OcpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).OcpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).OcpuCount = value ?? default(float); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateProperties()); set => this._property = value; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? StorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).StorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)Property).StorageSizeInGb = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateTags()); set => this._tag = value; } + + /// Creates an new instance. + public CloudVMClusterUpdate() + { + + } + } + /// The type used for update operations of the CloudVmCluster. + public partial interface ICloudVMClusterUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of mount path and size.", + SerializedName = @"fileSystemConfigurationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags Tag { get; set; } + + } + /// The type used for update operations of the CloudVmCluster. + internal partial interface ICloudVMClusterUpdateInternal + + { + /// The list of compute servers to be added to the cloud VM cluster. + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int? CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + string DisplayName { get; set; } + /// Array of mount path and size. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties Property { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.json.cs new file mode 100644 index 000000000000..835d81e9b963 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the CloudVmCluster. + public partial class CloudVMClusterUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateProperties.FromJson(__jsonProperties) : Property;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClusterUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..a364a290e52c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.PowerShell.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The updatable properties of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdatePropertiesTypeConverter))] + public partial class CloudVMClusterUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FileSystemConfigurationDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).FileSystemConfigurationDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[]) content.GetValueForProperty("FileSystemConfigurationDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).FileSystemConfigurationDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetailsTypeConverter.ConvertFrom)); + } + if (content.Contains("DataStorageSizeInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb = (double?) content.GetValueForProperty("DataStorageSizeInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataStorageSizeInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount = (float?) content.GetValueForProperty("OcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).OcpuCount, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("ComputeNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode = (string[]) content.GetValueForProperty("ComputeNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).ComputeNode, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The updatable properties of the CloudVmCluster. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdatePropertiesTypeConverter))] + public partial interface ICloudVMClusterUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..121bd6ee2f37 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.cs new file mode 100644 index 000000000000..c092b43c6ca4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.cs @@ -0,0 +1,315 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the CloudVmCluster. + public partial class CloudVMClusterUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal + { + + /// Backing field for property. + private string[] _computeNode; + + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] ComputeNode { get => this._computeNode; set => this._computeNode = value; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions _dataCollectionOption; + + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions()); set => this._dataCollectionOption = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled = value ?? default(bool); } + + /// Backing field for property. + private double? _dataStorageSizeInTb; + + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? DataStorageSizeInTb { get => this._dataStorageSizeInTb; set => this._dataStorageSizeInTb = value; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set => this._dbNodeStorageSizeInGb = value; } + + /// Backing field for property. + private string _displayName; + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] _fileSystemConfigurationDetail; + + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get => this._fileSystemConfigurationDetail; set => this._fileSystemConfigurationDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? _licenseModel; + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; set => this._memorySizeInGb = value; } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdatePropertiesInternal.DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions()); set { {_dataCollectionOption = value;} } } + + /// Backing field for property. + private float? _ocpuCount; + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public float? OcpuCount { get => this._ocpuCount; set => this._ocpuCount = value; } + + /// Backing field for property. + private string[] _sshPublicKey; + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] SshPublicKey { get => this._sshPublicKey; set => this._sshPublicKey = value; } + + /// Backing field for property. + private int? _storageSizeInGb; + + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? StorageSizeInGb { get => this._storageSizeInGb; set => this._storageSizeInGb = value; } + + /// Creates an new instance. + public CloudVMClusterUpdateProperties() + { + + } + } + /// The updatable properties of the CloudVmCluster. + public partial interface ICloudVMClusterUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The list of compute servers to be added to the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Array of mount path and size. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of mount path and size.", + SerializedName = @"fileSystemConfigurationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// The memory to be allocated in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + float? OcpuCount { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + + } + /// The updatable properties of the CloudVmCluster. + internal partial interface ICloudVMClusterUpdatePropertiesInternal + + { + /// The list of compute servers to be added to the cloud VM cluster. + string[] ComputeNode { get; set; } + /// The number of CPU cores enabled on the cloud VM cluster. + int? CpuCoreCount { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// The data disk group size to be allocated in TBs. + double? DataStorageSizeInTb { get; set; } + /// The local node storage to be allocated in GBs. + int? DbNodeStorageSizeInGb { get; set; } + /// Display Name + string DisplayName { get; set; } + /// Array of mount path and size. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get; set; } + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// The memory to be allocated in GBs. + int? MemorySizeInGb { get; set; } + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + float? OcpuCount { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + string[] SshPublicKey { get; set; } + /// The data disk group size to be allocated in GBs per VM. + int? StorageSizeInGb { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.json.cs new file mode 100644 index 000000000000..6ec10a99618c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateProperties.json.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the CloudVmCluster. + public partial class CloudVMClusterUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClusterUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dataCollectionOption = If( json?.PropertyT("dataCollectionOptions"), out var __jsonDataCollectionOptions) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions.FromJson(__jsonDataCollectionOptions) : DataCollectionOption;} + {_storageSizeInGb = If( json?.PropertyT("storageSizeInGbs"), out var __jsonStorageSizeInGbs) ? (int?)__jsonStorageSizeInGbs : StorageSizeInGb;} + {_fileSystemConfigurationDetail = If( json?.PropertyT("fileSystemConfigurationDetails"), out var __jsonFileSystemConfigurationDetails) ? If( __jsonFileSystemConfigurationDetails as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FileSystemConfigurationDetails.FromJson(__u) )) ))() : null : FileSystemConfigurationDetail;} + {_dataStorageSizeInTb = If( json?.PropertyT("dataStorageSizeInTbs"), out var __jsonDataStorageSizeInTbs) ? (double?)__jsonDataStorageSizeInTbs : DataStorageSizeInTb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : DbNodeStorageSizeInGb;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : MemorySizeInGb;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : CpuCoreCount;} + {_ocpuCount = If( json?.PropertyT("ocpuCount"), out var __jsonOcpuCount) ? (float?)__jsonOcpuCount : OcpuCount;} + {_sshPublicKey = If( json?.PropertyT("sshPublicKeys"), out var __jsonSshPublicKeys) ? If( __jsonSshPublicKeys as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : SshPublicKey;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)LicenseModel;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_computeNode = If( json?.PropertyT("computeNodes"), out var __jsonComputeNodes) ? If( __jsonComputeNodes as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : ComputeNode;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClusterUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dataCollectionOption ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._dataCollectionOption.ToJson(null,serializationMode) : null, "dataCollectionOptions" ,container.Add ); + AddIf( null != this._storageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._storageSizeInGb) : null, "storageSizeInGbs" ,container.Add ); + if (null != this._fileSystemConfigurationDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._fileSystemConfigurationDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("fileSystemConfigurationDetails",__w); + } + AddIf( null != this._dataStorageSizeInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._dataStorageSizeInTb) : null, "dataStorageSizeInTbs" ,container.Add ); + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + AddIf( null != this._ocpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((float)this._ocpuCount) : null, "ocpuCount" ,container.Add ); + if (null != this._sshPublicKey) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._sshPublicKey ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("sshPublicKeys",__r); + } + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + if (null != this._computeNode) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __n in this._computeNode ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("computeNodes",__m); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..8e3d9e60c284 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.PowerShell.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTagsTypeConverter))] + public partial class CloudVMClusterUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClusterUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClusterUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClusterUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClusterUpdateTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(CloudVMClusterUpdateTagsTypeConverter))] + public partial interface ICloudVMClusterUpdateTags + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..ee47659cdaf5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClusterUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClusterUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClusterUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.cs new file mode 100644 index 000000000000..ef0d8fd73ce5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class CloudVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTagsInternal + { + + /// Creates an new instance. + public CloudVMClusterUpdateTags() + { + + } + } + /// Resource tags. + public partial interface ICloudVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ICloudVMClusterUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.dictionary.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.dictionary.cs new file mode 100644 index 000000000000..d32061ffffd1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.json.cs new file mode 100644 index 000000000000..3ea6b2cf0d7b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CloudVMClusterUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class CloudVMClusterUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + /// + internal CloudVMClusterUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClusterUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.PowerShell.cs new file mode 100644 index 000000000000..7253fa9be41f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Connection strings to connect to an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(ConnectionStringTypeTypeConverter))] + public partial class ConnectionStringType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ConnectionStringType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("AllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("Dedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Dedicated = (string) content.GetValueForProperty("Dedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Dedicated, global::System.Convert.ToString); + } + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Profile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ConnectionStringType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AllConnectionString")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionString = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType) content.GetValueForProperty("AllConnectionString",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionString, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringTypeTypeConverter.ConvertFrom); + } + if (content.Contains("Dedicated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Dedicated = (string) content.GetValueForProperty("Dedicated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Dedicated, global::System.Convert.ToString); + } + if (content.Contains("High")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).High = (string) content.GetValueForProperty("High",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).High, global::System.Convert.ToString); + } + if (content.Contains("Low")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Low = (string) content.GetValueForProperty("Low",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Low, global::System.Convert.ToString); + } + if (content.Contains("Medium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Medium = (string) content.GetValueForProperty("Medium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Medium, global::System.Convert.ToString); + } + if (content.Contains("Profile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Profile = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[]) content.GetValueForProperty("Profile",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).Profile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileTypeTypeConverter.ConvertFrom)); + } + if (content.Contains("AllConnectionStringHigh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringHigh = (string) content.GetValueForProperty("AllConnectionStringHigh",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringHigh, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringLow")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringLow = (string) content.GetValueForProperty("AllConnectionStringLow",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringLow, global::System.Convert.ToString); + } + if (content.Contains("AllConnectionStringMedium")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringMedium = (string) content.GetValueForProperty("AllConnectionStringMedium",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal)this).AllConnectionStringMedium, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ConnectionStringType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ConnectionStringType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Connection strings to connect to an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(ConnectionStringTypeTypeConverter))] + public partial interface IConnectionStringType + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.TypeConverter.cs new file mode 100644 index 000000000000..e6cc37911116 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ConnectionStringTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ConnectionStringType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ConnectionStringType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ConnectionStringType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.cs new file mode 100644 index 000000000000..3ab2e05313b9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.cs @@ -0,0 +1,249 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Connection strings to connect to an Oracle Autonomous Database. + public partial class ConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType _allConnectionString; + + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType AllConnectionString { get => (this._allConnectionString = this._allConnectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringType()); set => this._allConnectionString = value; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringHigh { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)AllConnectionString).High; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)AllConnectionString).High = value ?? null; } + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringLow { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)AllConnectionString).Low; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)AllConnectionString).Low = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AllConnectionStringMedium { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)AllConnectionString).Medium; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringTypeInternal)AllConnectionString).Medium = value ?? null; } + + /// Backing field for property. + private string _dedicated; + + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Dedicated { get => this._dedicated; set => this._dedicated = value; } + + /// Backing field for property. + private string _high; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string High { get => this._high; set => this._high = value; } + + /// Backing field for property. + private string _low; + + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Low { get => this._low; set => this._low = value; } + + /// Backing field for property. + private string _medium; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Medium { get => this._medium; set => this._medium = value; } + + /// Internal Acessors for AllConnectionString + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringTypeInternal.AllConnectionString { get => (this._allConnectionString = this._allConnectionString ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringType()); set { {_allConnectionString = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] _profile; + + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] Profile { get => this._profile; set => this._profile = value; } + + /// Creates an new instance. + public ConnectionStringType() + { + + } + } + /// Connection strings to connect to an Oracle Autonomous Database. + public partial interface IConnectionStringType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringLow { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string AllConnectionStringMedium { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"dedicated", + PossibleTypes = new [] { typeof(string) })] + string Dedicated { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"high", + PossibleTypes = new [] { typeof(string) })] + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements.", + SerializedName = @"low", + PossibleTypes = new [] { typeof(string) })] + string Low { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"medium", + PossibleTypes = new [] { typeof(string) })] + string Medium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of connection string profiles to allow clients to group, filter and select connection string values based on structured metadata.", + SerializedName = @"profiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] Profile { get; set; } + + } + /// Connection strings to connect to an Oracle Autonomous Database. + internal partial interface IConnectionStringTypeInternal + + { + /// + /// Returns all connection strings that can be used to connect to the Autonomous Database. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAllConnectionStringType AllConnectionString { get; set; } + /// + /// 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. + /// + string AllConnectionStringHigh { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string AllConnectionStringLow { get; set; } + /// + /// 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. + /// + string AllConnectionStringMedium { get; set; } + /// + /// The database service provides the least level of resources to each SQL statement, but supports the most number of concurrent + /// SQL statements. + /// + string Dedicated { get; set; } + /// + /// 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. + /// + string High { get; set; } + /// + /// The Low database service provides the least level of resources to each SQL statement, but supports the most number of + /// concurrent SQL statements. + /// + string Low { get; set; } + /// + /// 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. + /// + string Medium { get; set; } + /// + /// A list of connection string profiles to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType[] Profile { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.json.cs new file mode 100644 index 000000000000..be9508255ac7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionStringType.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Connection strings to connect to an Oracle Autonomous Database. + public partial class ConnectionStringType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ConnectionStringType(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_allConnectionString = If( json?.PropertyT("allConnectionStrings"), out var __jsonAllConnectionStrings) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AllConnectionStringType.FromJson(__jsonAllConnectionStrings) : AllConnectionString;} + {_dedicated = If( json?.PropertyT("dedicated"), out var __jsonDedicated) ? (string)__jsonDedicated : (string)Dedicated;} + {_high = If( json?.PropertyT("high"), out var __jsonHigh) ? (string)__jsonHigh : (string)High;} + {_low = If( json?.PropertyT("low"), out var __jsonLow) ? (string)__jsonLow : (string)Low;} + {_medium = If( json?.PropertyT("medium"), out var __jsonMedium) ? (string)__jsonMedium : (string)Medium;} + {_profile = If( json?.PropertyT("profiles"), out var __jsonProfiles) ? If( __jsonProfiles as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ProfileType.FromJson(__u) )) ))() : null : Profile;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionStringType FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ConnectionStringType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._allConnectionString ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._allConnectionString.ToJson(null,serializationMode) : null, "allConnectionStrings" ,container.Add ); + AddIf( null != (((object)this._dedicated)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dedicated.ToString()) : null, "dedicated" ,container.Add ); + AddIf( null != (((object)this._high)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._high.ToString()) : null, "high" ,container.Add ); + AddIf( null != (((object)this._low)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._low.ToString()) : null, "low" ,container.Add ); + AddIf( null != (((object)this._medium)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._medium.ToString()) : null, "medium" ,container.Add ); + if (null != this._profile) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._profile ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("profiles",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.PowerShell.cs new file mode 100644 index 000000000000..b5effd407cc4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.PowerShell.cs @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// 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. + /// + [System.ComponentModel.TypeConverter(typeof(ConnectionUrlTypeTypeConverter))] + public partial class ConnectionUrlType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ConnectionUrlType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).ApexUrl = (string) content.GetValueForProperty("ApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).ApexUrl, global::System.Convert.ToString); + } + if (content.Contains("DatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl = (string) content.GetValueForProperty("DatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("GraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).GraphStudioUrl = (string) content.GetValueForProperty("GraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).GraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("MachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl = (string) content.GetValueForProperty("MachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("MongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MongoDbUrl = (string) content.GetValueForProperty("MongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("OrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).OrdsUrl = (string) content.GetValueForProperty("OrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).OrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).SqlDevWebUrl = (string) content.GetValueForProperty("SqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).SqlDevWebUrl, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ConnectionUrlType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ApexUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).ApexUrl = (string) content.GetValueForProperty("ApexUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).ApexUrl, global::System.Convert.ToString); + } + if (content.Contains("DatabaseTransformsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl = (string) content.GetValueForProperty("DatabaseTransformsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).DatabaseTransformsUrl, global::System.Convert.ToString); + } + if (content.Contains("GraphStudioUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).GraphStudioUrl = (string) content.GetValueForProperty("GraphStudioUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).GraphStudioUrl, global::System.Convert.ToString); + } + if (content.Contains("MachineLearningNotebookUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl = (string) content.GetValueForProperty("MachineLearningNotebookUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MachineLearningNotebookUrl, global::System.Convert.ToString); + } + if (content.Contains("MongoDbUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MongoDbUrl = (string) content.GetValueForProperty("MongoDbUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).MongoDbUrl, global::System.Convert.ToString); + } + if (content.Contains("OrdsUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).OrdsUrl = (string) content.GetValueForProperty("OrdsUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).OrdsUrl, global::System.Convert.ToString); + } + if (content.Contains("SqlDevWebUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).SqlDevWebUrl = (string) content.GetValueForProperty("SqlDevWebUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal)this).SqlDevWebUrl, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ConnectionUrlType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ConnectionUrlType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// 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. + [System.ComponentModel.TypeConverter(typeof(ConnectionUrlTypeTypeConverter))] + public partial interface IConnectionUrlType + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.TypeConverter.cs new file mode 100644 index 000000000000..3070af84c537 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ConnectionUrlTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ConnectionUrlType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ConnectionUrlType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ConnectionUrlType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.cs new file mode 100644 index 000000000000..b9270acca73e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// 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. + /// + public partial class ConnectionUrlType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlTypeInternal + { + + /// Backing field for property. + private string _apexUrl; + + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ApexUrl { get => this._apexUrl; set => this._apexUrl = value; } + + /// Backing field for property. + private string _databaseTransformsUrl; + + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DatabaseTransformsUrl { get => this._databaseTransformsUrl; set => this._databaseTransformsUrl = value; } + + /// Backing field for property. + private string _graphStudioUrl; + + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string GraphStudioUrl { get => this._graphStudioUrl; set => this._graphStudioUrl = value; } + + /// Backing field for property. + private string _machineLearningNotebookUrl; + + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string MachineLearningNotebookUrl { get => this._machineLearningNotebookUrl; set => this._machineLearningNotebookUrl = value; } + + /// Backing field for property. + private string _mongoDbUrl; + + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string MongoDbUrl { get => this._mongoDbUrl; set => this._mongoDbUrl = value; } + + /// Backing field for property. + private string _ordsUrl; + + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OrdsUrl { get => this._ordsUrl; set => this._ordsUrl = value; } + + /// Backing field for property. + private string _sqlDevWebUrl; + + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SqlDevWebUrl { get => this._sqlDevWebUrl; set => this._sqlDevWebUrl = value; } + + /// Creates an new instance. + public ConnectionUrlType() + { + + } + } + /// 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. + public partial interface IConnectionUrlType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Oracle Application Express (APEX) URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle Application Express (APEX) URL.", + SerializedName = @"apexUrl", + PossibleTypes = new [] { typeof(string) })] + string ApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Database Transforms for the Autonomous Database.", + SerializedName = @"databaseTransformsUrl", + PossibleTypes = new [] { typeof(string) })] + string DatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Graph Studio for the Autonomous Database.", + SerializedName = @"graphStudioUrl", + PossibleTypes = new [] { typeof(string) })] + string GraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database.", + SerializedName = @"machineLearningNotebookUrl", + PossibleTypes = new [] { typeof(string) })] + string MachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The URL of the MongoDB API for the Autonomous Database.", + SerializedName = @"mongoDbUrl", + PossibleTypes = new [] { typeof(string) })] + string MongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database.", + SerializedName = @"ordsUrl", + PossibleTypes = new [] { typeof(string) })] + string OrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle SQL Developer Web URL.", + SerializedName = @"sqlDevWebUrl", + PossibleTypes = new [] { typeof(string) })] + string SqlDevWebUrl { get; set; } + + } + /// 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. + internal partial interface IConnectionUrlTypeInternal + + { + /// Oracle Application Express (APEX) URL. + string ApexUrl { get; set; } + /// The URL of the Database Transforms for the Autonomous Database. + string DatabaseTransformsUrl { get; set; } + /// The URL of the Graph Studio for the Autonomous Database. + string GraphStudioUrl { get; set; } + /// + /// The URL of the Oracle Machine Learning (OML) Notebook for the Autonomous Database. + /// + string MachineLearningNotebookUrl { get; set; } + /// The URL of the MongoDB API for the Autonomous Database. + string MongoDbUrl { get; set; } + /// + /// The Oracle REST Data Services (ORDS) URL of the Web Access for the Autonomous Database. + /// + string OrdsUrl { get; set; } + /// Oracle SQL Developer Web URL. + string SqlDevWebUrl { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.json.cs new file mode 100644 index 000000000000..f2de71eba4b9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ConnectionUrlType.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// 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. + /// + public partial class ConnectionUrlType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ConnectionUrlType(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_apexUrl = If( json?.PropertyT("apexUrl"), out var __jsonApexUrl) ? (string)__jsonApexUrl : (string)ApexUrl;} + {_databaseTransformsUrl = If( json?.PropertyT("databaseTransformsUrl"), out var __jsonDatabaseTransformsUrl) ? (string)__jsonDatabaseTransformsUrl : (string)DatabaseTransformsUrl;} + {_graphStudioUrl = If( json?.PropertyT("graphStudioUrl"), out var __jsonGraphStudioUrl) ? (string)__jsonGraphStudioUrl : (string)GraphStudioUrl;} + {_machineLearningNotebookUrl = If( json?.PropertyT("machineLearningNotebookUrl"), out var __jsonMachineLearningNotebookUrl) ? (string)__jsonMachineLearningNotebookUrl : (string)MachineLearningNotebookUrl;} + {_mongoDbUrl = If( json?.PropertyT("mongoDbUrl"), out var __jsonMongoDbUrl) ? (string)__jsonMongoDbUrl : (string)MongoDbUrl;} + {_ordsUrl = If( json?.PropertyT("ordsUrl"), out var __jsonOrdsUrl) ? (string)__jsonOrdsUrl : (string)OrdsUrl;} + {_sqlDevWebUrl = If( json?.PropertyT("sqlDevWebUrl"), out var __jsonSqlDevWebUrl) ? (string)__jsonSqlDevWebUrl : (string)SqlDevWebUrl;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IConnectionUrlType FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ConnectionUrlType(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._apexUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._apexUrl.ToString()) : null, "apexUrl" ,container.Add ); + AddIf( null != (((object)this._databaseTransformsUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._databaseTransformsUrl.ToString()) : null, "databaseTransformsUrl" ,container.Add ); + AddIf( null != (((object)this._graphStudioUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._graphStudioUrl.ToString()) : null, "graphStudioUrl" ,container.Add ); + AddIf( null != (((object)this._machineLearningNotebookUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._machineLearningNotebookUrl.ToString()) : null, "machineLearningNotebookUrl" ,container.Add ); + AddIf( null != (((object)this._mongoDbUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._mongoDbUrl.ToString()) : null, "mongoDbUrl" ,container.Add ); + AddIf( null != (((object)this._ordsUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ordsUrl.ToString()) : null, "ordsUrl" ,container.Add ); + AddIf( null != (((object)this._sqlDevWebUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sqlDevWebUrl.ToString()) : null, "sqlDevWebUrl" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.PowerShell.cs new file mode 100644 index 000000000000..10ec7b3f297f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// CustomerContact resource properties + [System.ComponentModel.TypeConverter(typeof(CustomerContactTypeConverter))] + public partial class CustomerContact + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CustomerContact(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Email")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContactInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContactInternal)this).Email, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CustomerContact(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Email")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContactInternal)this).Email = (string) content.GetValueForProperty("Email",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContactInternal)this).Email, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CustomerContact(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CustomerContact(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// CustomerContact resource properties + [System.ComponentModel.TypeConverter(typeof(CustomerContactTypeConverter))] + public partial interface ICustomerContact + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.TypeConverter.cs new file mode 100644 index 000000000000..eedcf0aadfba --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CustomerContactTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CustomerContact.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CustomerContact.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CustomerContact.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.cs new file mode 100644 index 000000000000..67588916c547 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.cs @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CustomerContact resource properties + public partial class CustomerContact : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContactInternal + { + + /// Backing field for property. + private string _email; + + /// + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Email { get => this._email; set => this._email = value; } + + /// Creates an new instance. + public CustomerContact() + { + + } + } + /// CustomerContact resource properties + public partial interface ICustomerContact : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The email address used by Oracle to send notifications regarding databases and infrastructure.", + SerializedName = @"email", + PossibleTypes = new [] { typeof(string) })] + string Email { get; set; } + + } + /// CustomerContact resource properties + internal partial interface ICustomerContactInternal + + { + /// + /// The email address used by Oracle to send notifications regarding databases and infrastructure. + /// + string Email { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.json.cs new file mode 100644 index 000000000000..ed925f137047 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/CustomerContact.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// CustomerContact resource properties + public partial class CustomerContact + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CustomerContact(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_email = If( json?.PropertyT("email"), out var __jsonEmail) ? (string)__jsonEmail : (string)Email;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CustomerContact(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._email)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._email.ToString()) : null, "email" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.PowerShell.cs new file mode 100644 index 000000000000..7b16d21d9303 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DataCollectionOptions resource properties + [System.ComponentModel.TypeConverter(typeof(DataCollectionOptionsTypeConverter))] + public partial class DataCollectionOptions + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DataCollectionOptions(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("IsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("IsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled = (bool?) content.GetValueForProperty("IsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DataCollectionOptions(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("IsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("IsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled = (bool?) content.GetValueForProperty("IsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)this).IsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DataCollectionOptions(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DataCollectionOptions(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DataCollectionOptions resource properties + [System.ComponentModel.TypeConverter(typeof(DataCollectionOptionsTypeConverter))] + public partial interface IDataCollectionOptions + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.TypeConverter.cs new file mode 100644 index 000000000000..f9ec084133bc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DataCollectionOptionsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DataCollectionOptions.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DataCollectionOptions.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DataCollectionOptions.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.cs new file mode 100644 index 000000000000..10a659590a12 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DataCollectionOptions resource properties + public partial class DataCollectionOptions : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal + { + + /// Backing field for property. + private bool? _isDiagnosticsEventsEnabled; + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsDiagnosticsEventsEnabled { get => this._isDiagnosticsEventsEnabled; set => this._isDiagnosticsEventsEnabled = value; } + + /// Backing field for property. + private bool? _isHealthMonitoringEnabled; + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsHealthMonitoringEnabled { get => this._isHealthMonitoringEnabled; set => this._isHealthMonitoringEnabled = value; } + + /// Backing field for property. + private bool? _isIncidentLogsEnabled; + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsIncidentLogsEnabled { get => this._isIncidentLogsEnabled; set => this._isIncidentLogsEnabled = value; } + + /// Creates an new instance. + public DataCollectionOptions() + { + + } + } + /// DataCollectionOptions resource properties + public partial interface IDataCollectionOptions : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsIncidentLogsEnabled { get; set; } + + } + /// DataCollectionOptions resource properties + internal partial interface IDataCollectionOptionsInternal + + { + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? IsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? IsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? IsIncidentLogsEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.json.cs new file mode 100644 index 000000000000..805d943a392f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DataCollectionOptions.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DataCollectionOptions resource properties + public partial class DataCollectionOptions + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DataCollectionOptions(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_isDiagnosticsEventsEnabled = If( json?.PropertyT("isDiagnosticsEventsEnabled"), out var __jsonIsDiagnosticsEventsEnabled) ? (bool?)__jsonIsDiagnosticsEventsEnabled : IsDiagnosticsEventsEnabled;} + {_isHealthMonitoringEnabled = If( json?.PropertyT("isHealthMonitoringEnabled"), out var __jsonIsHealthMonitoringEnabled) ? (bool?)__jsonIsHealthMonitoringEnabled : IsHealthMonitoringEnabled;} + {_isIncidentLogsEnabled = If( json?.PropertyT("isIncidentLogsEnabled"), out var __jsonIsIncidentLogsEnabled) ? (bool?)__jsonIsIncidentLogsEnabled : IsIncidentLogsEnabled;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DataCollectionOptions(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._isDiagnosticsEventsEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isDiagnosticsEventsEnabled) : null, "isDiagnosticsEventsEnabled" ,container.Add ); + AddIf( null != this._isHealthMonitoringEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isHealthMonitoringEnabled) : null, "isHealthMonitoringEnabled" ,container.Add ); + AddIf( null != this._isIncidentLogsEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isIncidentLogsEnabled) : null, "isIncidentLogsEnabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.PowerShell.cs new file mode 100644 index 000000000000..e68757daa61e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekTypeConverter))] + public partial class DayOfWeek + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DayOfWeek(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DayOfWeek(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DayOfWeek(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DayOfWeek(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekTypeConverter))] + public partial interface IDayOfWeek + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.TypeConverter.cs new file mode 100644 index 000000000000..298b02cd4696 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DayOfWeekTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DayOfWeek.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DayOfWeek.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DayOfWeek.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.cs new file mode 100644 index 000000000000..2dc353a36b1b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeek : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName _name; + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DayOfWeek() + { + + } + } + /// DayOfWeek resource properties + public partial interface IDayOfWeek : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Name { get; set; } + + } + /// DayOfWeek resource properties + internal partial interface IDayOfWeekInternal + + { + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.json.cs new file mode 100644 index 000000000000..2629b48a137e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeek.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeek + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DayOfWeek(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DayOfWeek(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.PowerShell.cs new file mode 100644 index 000000000000..b39e64338d67 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekUpdateTypeConverter))] + public partial class DayOfWeekUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DayOfWeekUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdateInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdateInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DayOfWeekUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdateInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdateInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DayOfWeekUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DayOfWeekUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DayOfWeek resource properties + [System.ComponentModel.TypeConverter(typeof(DayOfWeekUpdateTypeConverter))] + public partial interface IDayOfWeekUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.TypeConverter.cs new file mode 100644 index 000000000000..f144ff60e869 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DayOfWeekUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DayOfWeekUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DayOfWeekUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DayOfWeekUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.cs new file mode 100644 index 000000000000..9c16212c2a60 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeekUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdateInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? _name; + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public DayOfWeekUpdate() + { + + } + } + /// DayOfWeek resource properties + public partial interface IDayOfWeekUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? Name { get; set; } + + } + /// DayOfWeek resource properties + internal partial interface IDayOfWeekUpdateInternal + + { + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.json.cs new file mode 100644 index 000000000000..38e03c0db85a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DayOfWeekUpdate.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DayOfWeek resource properties + public partial class DayOfWeekUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DayOfWeekUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DayOfWeekUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.PowerShell.cs new file mode 100644 index 000000000000..2466deb70fe6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// ExascaleDbNode action response + [System.ComponentModel.TypeConverter(typeof(DbActionResponseTypeConverter))] + public partial class DbActionResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbActionResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponseInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponseInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbActionResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponseInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponseInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbActionResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbActionResponse(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// ExascaleDbNode action response + [System.ComponentModel.TypeConverter(typeof(DbActionResponseTypeConverter))] + public partial interface IDbActionResponse + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.TypeConverter.cs new file mode 100644 index 000000000000..93ebe25bf069 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbActionResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbActionResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbActionResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbActionResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.cs new file mode 100644 index 000000000000..d7430c0c8fd0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.cs @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExascaleDbNode action response + public partial class DbActionResponse : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponseInternal + { + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponseInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// ExascaleDbNode provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Creates an new instance. + public DbActionResponse() + { + + } + } + /// ExascaleDbNode action response + public partial interface IDbActionResponse : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// ExascaleDbNode provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ExascaleDbNode provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + + } + /// ExascaleDbNode action response + internal partial interface IDbActionResponseInternal + + { + /// ExascaleDbNode provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.json.cs new file mode 100644 index 000000000000..8cfdcd010309 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbActionResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExascaleDbNode action response + public partial class DbActionResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbActionResponse(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbActionResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.PowerShell.cs new file mode 100644 index 000000000000..d93a5887370a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DbIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(DbIormConfigTypeConverter))] + public partial class DbIormConfig + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbIormConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).DbName = (string) content.GetValueForProperty("DbName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).DbName, global::System.Convert.ToString); + } + if (content.Contains("FlashCacheLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).FlashCacheLimit = (string) content.GetValueForProperty("FlashCacheLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).FlashCacheLimit, global::System.Convert.ToString); + } + if (content.Contains("Share")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).Share = (int?) content.GetValueForProperty("Share",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).Share, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbIormConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).DbName = (string) content.GetValueForProperty("DbName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).DbName, global::System.Convert.ToString); + } + if (content.Contains("FlashCacheLimit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).FlashCacheLimit = (string) content.GetValueForProperty("FlashCacheLimit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).FlashCacheLimit, global::System.Convert.ToString); + } + if (content.Contains("Share")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).Share = (int?) content.GetValueForProperty("Share",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal)this).Share, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbIormConfig(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbIormConfig(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DbIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(DbIormConfigTypeConverter))] + public partial interface IDbIormConfig + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.TypeConverter.cs new file mode 100644 index 000000000000..f30d71356524 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbIormConfigTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbIormConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbIormConfig.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbIormConfig.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.cs new file mode 100644 index 000000000000..8e5c524304b2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbIormConfig for cloud vm cluster + public partial class DbIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfigInternal + { + + /// Backing field for property. + private string _dbName; + + /// The database name. For the default DbPlan, the dbName is default. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DbName { get => this._dbName; set => this._dbName = value; } + + /// Backing field for property. + private string _flashCacheLimit; + + /// + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string FlashCacheLimit { get => this._flashCacheLimit; set => this._flashCacheLimit = value; } + + /// Backing field for property. + private int? _share; + + /// The relative priority of this database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? Share { get => this._share; set => this._share = value; } + + /// Creates an new instance. + public DbIormConfig() + { + + } + } + /// DbIormConfig for cloud vm cluster + public partial interface IDbIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The database name. For the default DbPlan, the dbName is default. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database name. For the default DbPlan, the dbName is default.", + SerializedName = @"dbName", + PossibleTypes = new [] { typeof(string) })] + string DbName { get; set; } + /// + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the + /// database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The flash cache limit for this database. This value is internally configured based on the share value assigned to the database.", + SerializedName = @"flashCacheLimit", + PossibleTypes = new [] { typeof(string) })] + string FlashCacheLimit { get; set; } + /// The relative priority of this database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The relative priority of this database.", + SerializedName = @"share", + PossibleTypes = new [] { typeof(int) })] + int? Share { get; set; } + + } + /// DbIormConfig for cloud vm cluster + internal partial interface IDbIormConfigInternal + + { + /// The database name. For the default DbPlan, the dbName is default. + string DbName { get; set; } + /// + /// The flash cache limit for this database. This value is internally configured based on the share value assigned to the + /// database. + /// + string FlashCacheLimit { get; set; } + /// The relative priority of this database. + int? Share { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.json.cs new file mode 100644 index 000000000000..fcd9499bff5c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbIormConfig.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbIormConfig for cloud vm cluster + public partial class DbIormConfig + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbIormConfig(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbName = If( json?.PropertyT("dbName"), out var __jsonDbName) ? (string)__jsonDbName : (string)DbName;} + {_flashCacheLimit = If( json?.PropertyT("flashCacheLimit"), out var __jsonFlashCacheLimit) ? (string)__jsonFlashCacheLimit : (string)FlashCacheLimit;} + {_share = If( json?.PropertyT("share"), out var __jsonShare) ? (int?)__jsonShare : Share;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbIormConfig(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._dbName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbName.ToString()) : null, "dbName" ,container.Add ); + AddIf( null != (((object)this._flashCacheLimit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._flashCacheLimit.ToString()) : null, "flashCacheLimit" ,container.Add ); + AddIf( null != this._share ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._share) : null, "share" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.PowerShell.cs new file mode 100644 index 000000000000..95ed98828775 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.PowerShell.cs @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The DbNode resource belonging to vmCluster + [System.ComponentModel.TypeConverter(typeof(DbNodeTypeConverter))] + public partial class DbNode + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNode(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MaintenanceType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType?) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MaintenanceType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType.CreateFrom); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNode(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).StorageSizeInGb = (int?) content.GetValueForProperty("StorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).StorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MaintenanceType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType?) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MaintenanceType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType.CreateFrom); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNode(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNode(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The DbNode resource belonging to vmCluster + [System.ComponentModel.TypeConverter(typeof(DbNodeTypeConverter))] + public partial interface IDbNode + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.TypeConverter.cs new file mode 100644 index 000000000000..e8821c4f5e1d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNode.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNode.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNode.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.cs new file mode 100644 index 000000000000..f86733c69a3e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The DbNode resource belonging to vmCluster + public partial class DbNode : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AdditionalDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).AdditionalDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).AdditionalDetail = value ?? null; } + + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string BackupIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).BackupIPId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).BackupIPId = value ?? null; } + + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string BackupVnic2Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).BackupVnic2Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).BackupVnic2Id = value ?? null; } + + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string BackupVnicId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).BackupVnicId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).BackupVnicId = value ?? null; } + + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DbServerId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).DbServerId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).DbServerId = value ?? null; } + + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DbSystemId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).DbSystemId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).DbSystemId = value ?? null; } + + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string FaultDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).FaultDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).FaultDomain = value ?? null; } + + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string HostIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).HostIPId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).HostIPId = value ?? null; } + + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Hostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).Hostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).Hostname = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).LifecycleDetail = value ?? null; } + + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).LifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState)""); } + + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType? MaintenanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).MaintenanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).MaintenanceType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType)""); } + + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).MemorySizeInGb = value ?? default(int); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).Ocid = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).ProvisioningState; } + + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? SoftwareStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).SoftwareStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).SoftwareStorageSizeInGb = value ?? default(int); } + + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? StorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).DbNodeStorageSizeInGb = value ?? default(int); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).TimeCreated = value ?? default(global::System.DateTime); } + + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceWindowEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowEnd = value ?? default(global::System.DateTime); } + + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceWindowStart { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowStart; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).TimeMaintenanceWindowStart = value ?? default(global::System.DateTime); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Vnic2Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).Vnic2Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).Vnic2Id = value ?? null; } + + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string VnicId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).VnicId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)Property).VnicId = value ?? null; } + + /// Creates an new instance. + public DbNode() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The DbNode resource belonging to vmCluster + public partial interface IDbNode : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the planned maintenance.", + SerializedName = @"additionalDetails", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; set; } + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the backup IP address associated with the database node.", + SerializedName = @"backupIpId", + PossibleTypes = new [] { typeof(string) })] + string BackupIPId { get; set; } + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the second backup VNIC.", + SerializedName = @"backupVnic2Id", + PossibleTypes = new [] { typeof(string) })] + string BackupVnic2Id { get; set; } + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the backup VNIC.", + SerializedName = @"backupVnicId", + PossibleTypes = new [] { typeof(string) })] + string BackupVnicId { get; set; } + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the Db node.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the Exacc Db server associated with the database node.", + SerializedName = @"dbServerId", + PossibleTypes = new [] { typeof(string) })] + string DbServerId { get; set; } + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the DB system.", + SerializedName = @"dbSystemId", + PossibleTypes = new [] { typeof(string) })] + string DbSystemId { get; set; } + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the Fault Domain the instance is contained in.", + SerializedName = @"faultDomain", + PossibleTypes = new [] { typeof(string) })] + string FaultDomain { get; set; } + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the host IP address associated with the database node.", + SerializedName = @"hostIpId", + PossibleTypes = new [] { typeof(string) })] + string HostIPId { get; set; } + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name for the database node.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Lifecycle details of Db Node.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; set; } + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of the database node.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get; set; } + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of database node maintenance.", + SerializedName = @"maintenanceType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType? MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated memory in GBs on the Db node.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DbNode OCID", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.", + SerializedName = @"softwareStorageSizeInGb", + PossibleTypes = new [] { typeof(int) })] + int? SoftwareStorageSizeInGb { get; set; } + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated local node storage in GBs on the Db node.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? StorageSizeInGb { get; set; } + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The date and time that the database node was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; set; } + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"End date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Start date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowStart", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the second VNIC.", + SerializedName = @"vnic2Id", + PossibleTypes = new [] { typeof(string) })] + string Vnic2Id { get; set; } + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the VNIC.", + SerializedName = @"vnicId", + PossibleTypes = new [] { typeof(string) })] + string VnicId { get; set; } + + } + /// The DbNode resource belonging to vmCluster + internal partial interface IDbNodeInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// Additional information about the planned maintenance. + string AdditionalDetail { get; set; } + /// The OCID of the backup IP address associated with the database node. + string BackupIPId { get; set; } + /// The OCID of the second backup VNIC. + string BackupVnic2Id { get; set; } + /// The OCID of the backup VNIC. + string BackupVnicId { get; set; } + /// The number of CPU cores enabled on the Db node. + int? CpuCoreCount { get; set; } + /// The OCID of the Exacc Db server associated with the database node. + string DbServerId { get; set; } + /// The OCID of the DB system. + string DbSystemId { get; set; } + /// The name of the Fault Domain the instance is contained in. + string FaultDomain { get; set; } + /// The OCID of the host IP address associated with the database node. + string HostIPId { get; set; } + /// The host name for the database node. + string Hostname { get; set; } + /// Lifecycle details of Db Node. + string LifecycleDetail { get; set; } + /// The current state of the database node. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get; set; } + /// The type of database node maintenance. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType? MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + int? MemorySizeInGb { get; set; } + /// DbNode OCID + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties Property { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + int? SoftwareStorageSizeInGb { get; set; } + /// The allocated local node storage in GBs on the Db node. + int? StorageSizeInGb { get; set; } + /// The date and time that the database node was created. + global::System.DateTime? TimeCreated { get; set; } + /// End date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The OCID of the second VNIC. + string Vnic2Id { get; set; } + /// The OCID of the VNIC. + string VnicId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.json.cs new file mode 100644 index 000000000000..f12691842ad0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNode.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The DbNode resource belonging to vmCluster + public partial class DbNode + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbNode(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbNode(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.PowerShell.cs new file mode 100644 index 000000000000..4d98ca3f93eb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DbNode action object + [System.ComponentModel.TypeConverter(typeof(DbNodeActionTypeConverter))] + public partial class DbNodeAction + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodeAction(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeActionInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeActionInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodeAction(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Action")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeActionInternal)this).Action = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum) content.GetValueForProperty("Action",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeActionInternal)this).Action, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodeAction(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodeAction(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DbNode action object + [System.ComponentModel.TypeConverter(typeof(DbNodeActionTypeConverter))] + public partial interface IDbNodeAction + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.TypeConverter.cs new file mode 100644 index 000000000000..eb05bddf335a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodeActionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodeAction.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodeAction.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodeAction.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.cs new file mode 100644 index 000000000000..e97736c1fa64 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbNode action object + public partial class DbNodeAction : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeActionInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum _action; + + /// Db action + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Action { get => this._action; set => this._action = value; } + + /// Creates an new instance. + public DbNodeAction() + { + + } + } + /// DbNode action object + public partial interface IDbNodeAction : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Db action + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Action { get; set; } + + } + /// DbNode action object + internal partial interface IDbNodeActionInternal + + { + /// Db action + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Action { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.json.cs new file mode 100644 index 000000000000..23a982de5879 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeAction.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbNode action object + public partial class DbNodeAction + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodeAction(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_action = If( json?.PropertyT("action"), out var __jsonAction) ? (string)__jsonAction : (string)Action;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbNodeAction(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._action)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._action.ToString()) : null, "action" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.PowerShell.cs new file mode 100644 index 000000000000..a70344ce4069 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.PowerShell.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + /// + [System.ComponentModel.TypeConverter(typeof(DbNodeDetailsTypeConverter))] + public partial class DbNodeDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodeDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetailsInternal)this).DbNodeId = (string) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetailsInternal)this).DbNodeId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodeDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetailsInternal)this).DbNodeId = (string) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetailsInternal)this).DbNodeId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodeDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodeDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + [System.ComponentModel.TypeConverter(typeof(DbNodeDetailsTypeConverter))] + public partial interface IDbNodeDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.TypeConverter.cs new file mode 100644 index 000000000000..254783468991 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodeDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodeDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodeDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodeDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.cs new file mode 100644 index 000000000000..3e91709fbc91 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.cs @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + /// + public partial class DbNodeDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetailsInternal + { + + /// Backing field for property. + private string _dbNodeId; + + /// Exascale DbNode Azure Resource ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DbNodeId { get => this._dbNodeId; set => this._dbNodeId = value; } + + /// Creates an new instance. + public DbNodeDetails() + { + + } + } + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + public partial interface IDbNodeDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Exascale DbNode Azure Resource ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Exascale DbNode Azure Resource ID", + SerializedName = @"dbNodeId", + PossibleTypes = new [] { typeof(string) })] + string DbNodeId { get; set; } + + } + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + internal partial interface IDbNodeDetailsInternal + + { + /// Exascale DbNode Azure Resource ID + string DbNodeId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.json.cs new file mode 100644 index 000000000000..f2dd8f19dc6c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeDetails.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Details of the ExaCS Db node. Applies to Exadata Database Service on Exascale Infrastructure only. + /// + public partial class DbNodeDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodeDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbNodeId = If( json?.PropertyT("dbNodeId"), out var __jsonDbNodeId) ? (string)__jsonDbNodeId : (string)DbNodeId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbNodeDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._dbNodeId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbNodeId.ToString()) : null, "dbNodeId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.PowerShell.cs new file mode 100644 index 000000000000..6f3703c4399c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a DbNode list operation. + [System.ComponentModel.TypeConverter(typeof(DbNodeListResultTypeConverter))] + public partial class DbNodeListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodeListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodeListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodeListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodeListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a DbNode list operation. + [System.ComponentModel.TypeConverter(typeof(DbNodeListResultTypeConverter))] + public partial interface IDbNodeListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.TypeConverter.cs new file mode 100644 index 000000000000..d2bba2cc7511 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodeListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodeListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodeListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodeListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.cs new file mode 100644 index 000000000000..d9b8b084971d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DbNode list operation. + public partial class DbNodeListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode[] _value; + + /// The DbNode items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DbNodeListResult() + { + + } + } + /// The response of a DbNode list operation. + public partial interface IDbNodeListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DbNode items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DbNode items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode[] Value { get; set; } + + } + /// The response of a DbNode list operation. + internal partial interface IDbNodeListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DbNode items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.json.cs new file mode 100644 index 000000000000..c7681250feda --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DbNode list operation. + public partial class DbNodeListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodeListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNode.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbNodeListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.PowerShell.cs new file mode 100644 index 000000000000..76b5c81d1cde --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.PowerShell.cs @@ -0,0 +1,322 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The properties of DbNodeResource + [System.ComponentModel.TypeConverter(typeof(DbNodePropertiesTypeConverter))] + public partial class DbNodeProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodeProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MaintenanceType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType?) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MaintenanceType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType.CreateFrom); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodeProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("BackupIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupIPId = (string) content.GetValueForProperty("BackupIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupIPId, global::System.Convert.ToString); + } + if (content.Contains("BackupVnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnic2Id = (string) content.GetValueForProperty("BackupVnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnic2Id, global::System.Convert.ToString); + } + if (content.Contains("BackupVnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnicId = (string) content.GetValueForProperty("BackupVnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).BackupVnicId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbServerId = (string) content.GetValueForProperty("DbServerId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbServerId, global::System.Convert.ToString); + } + if (content.Contains("DbSystemId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbSystemId = (string) content.GetValueForProperty("DbSystemId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).DbSystemId, global::System.Convert.ToString); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("HostIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).HostIPId = (string) content.GetValueForProperty("HostIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).HostIPId, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MaintenanceType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType?) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MaintenanceType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType.CreateFrom); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Vnic2Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Vnic2Id = (string) content.GetValueForProperty("Vnic2Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).Vnic2Id, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).VnicId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodeProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodeProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The properties of DbNodeResource + [System.ComponentModel.TypeConverter(typeof(DbNodePropertiesTypeConverter))] + public partial interface IDbNodeProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.TypeConverter.cs new file mode 100644 index 000000000000..64d01aba4c82 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodeProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodeProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodeProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.cs new file mode 100644 index 000000000000..7e5ed331b737 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.cs @@ -0,0 +1,437 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The properties of DbNodeResource + public partial class DbNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal + { + + /// Backing field for property. + private string _additionalDetail; + + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AdditionalDetail { get => this._additionalDetail; set => this._additionalDetail = value; } + + /// Backing field for property. + private string _backupIPId; + + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string BackupIPId { get => this._backupIPId; set => this._backupIPId = value; } + + /// Backing field for property. + private string _backupVnic2Id; + + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string BackupVnic2Id { get => this._backupVnic2Id; set => this._backupVnic2Id = value; } + + /// Backing field for property. + private string _backupVnicId; + + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string BackupVnicId { get => this._backupVnicId; set => this._backupVnicId = value; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set => this._dbNodeStorageSizeInGb = value; } + + /// Backing field for property. + private string _dbServerId; + + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DbServerId { get => this._dbServerId; set => this._dbServerId = value; } + + /// Backing field for property. + private string _dbSystemId; + + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DbSystemId { get => this._dbSystemId; set => this._dbSystemId = value; } + + /// Backing field for property. + private string _faultDomain; + + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string FaultDomain { get => this._faultDomain; set => this._faultDomain = value; } + + /// Backing field for property. + private string _hostIPId; + + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string HostIPId { get => this._hostIPId; set => this._hostIPId = value; } + + /// Backing field for property. + private string _hostname; + + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Hostname { get => this._hostname; set => this._hostname = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; set => this._lifecycleDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState _lifecycleState; + + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType? _maintenanceType; + + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType? MaintenanceType { get => this._maintenanceType; set => this._maintenanceType = value; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; set => this._memorySizeInGb = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _ocid; + + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private int? _softwareStorageSizeInGb; + + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? SoftwareStorageSizeInGb { get => this._softwareStorageSizeInGb; set => this._softwareStorageSizeInGb = value; } + + /// Backing field for property. + private global::System.DateTime _timeCreated; + + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime TimeCreated { get => this._timeCreated; set => this._timeCreated = value; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceWindowEnd; + + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceWindowEnd { get => this._timeMaintenanceWindowEnd; set => this._timeMaintenanceWindowEnd = value; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceWindowStart; + + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceWindowStart { get => this._timeMaintenanceWindowStart; set => this._timeMaintenanceWindowStart = value; } + + /// Backing field for property. + private string _vnic2Id; + + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Vnic2Id { get => this._vnic2Id; set => this._vnic2Id = value; } + + /// Backing field for property. + private string _vnicId; + + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string VnicId { get => this._vnicId; set => this._vnicId = value; } + + /// Creates an new instance. + public DbNodeProperties() + { + + } + } + /// The properties of DbNodeResource + public partial interface IDbNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the planned maintenance.", + SerializedName = @"additionalDetails", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; set; } + /// The OCID of the backup IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the backup IP address associated with the database node.", + SerializedName = @"backupIpId", + PossibleTypes = new [] { typeof(string) })] + string BackupIPId { get; set; } + /// The OCID of the second backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the second backup VNIC.", + SerializedName = @"backupVnic2Id", + PossibleTypes = new [] { typeof(string) })] + string BackupVnic2Id { get; set; } + /// The OCID of the backup VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the backup VNIC.", + SerializedName = @"backupVnicId", + PossibleTypes = new [] { typeof(string) })] + string BackupVnicId { get; set; } + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the Db node.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated local node storage in GBs on the Db node.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// The OCID of the Exacc Db server associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the Exacc Db server associated with the database node.", + SerializedName = @"dbServerId", + PossibleTypes = new [] { typeof(string) })] + string DbServerId { get; set; } + /// The OCID of the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The OCID of the DB system.", + SerializedName = @"dbSystemId", + PossibleTypes = new [] { typeof(string) })] + string DbSystemId { get; set; } + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the Fault Domain the instance is contained in.", + SerializedName = @"faultDomain", + PossibleTypes = new [] { typeof(string) })] + string FaultDomain { get; set; } + /// The OCID of the host IP address associated with the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the host IP address associated with the database node.", + SerializedName = @"hostIpId", + PossibleTypes = new [] { typeof(string) })] + string HostIPId { get; set; } + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name for the database node.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// Lifecycle details of Db Node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Lifecycle details of Db Node.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; set; } + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The current state of the database node.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState LifecycleState { get; set; } + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of database node maintenance.", + SerializedName = @"maintenanceType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType? MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated memory in GBs on the Db node.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.", + SerializedName = @"softwareStorageSizeInGb", + PossibleTypes = new [] { typeof(int) })] + int? SoftwareStorageSizeInGb { get; set; } + /// The date and time that the database node was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The date and time that the database node was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime TimeCreated { get; set; } + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"End date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Start date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowStart", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The OCID of the second VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the second VNIC.", + SerializedName = @"vnic2Id", + PossibleTypes = new [] { typeof(string) })] + string Vnic2Id { get; set; } + /// The OCID of the VNIC. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The OCID of the VNIC.", + SerializedName = @"vnicId", + PossibleTypes = new [] { typeof(string) })] + string VnicId { get; set; } + + } + /// The properties of DbNodeResource + internal partial interface IDbNodePropertiesInternal + + { + /// Additional information about the planned maintenance. + string AdditionalDetail { get; set; } + /// The OCID of the backup IP address associated with the database node. + string BackupIPId { get; set; } + /// The OCID of the second backup VNIC. + string BackupVnic2Id { get; set; } + /// The OCID of the backup VNIC. + string BackupVnicId { get; set; } + /// The number of CPU cores enabled on the Db node. + int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + int? DbNodeStorageSizeInGb { get; set; } + /// The OCID of the Exacc Db server associated with the database node. + string DbServerId { get; set; } + /// The OCID of the DB system. + string DbSystemId { get; set; } + /// The name of the Fault Domain the instance is contained in. + string FaultDomain { get; set; } + /// The OCID of the host IP address associated with the database node. + string HostIPId { get; set; } + /// The host name for the database node. + string Hostname { get; set; } + /// Lifecycle details of Db Node. + string LifecycleDetail { get; set; } + /// The current state of the database node. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState LifecycleState { get; set; } + /// The type of database node maintenance. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType? MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + int? MemorySizeInGb { get; set; } + /// DbNode OCID + string Ocid { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + int? SoftwareStorageSizeInGb { get; set; } + /// The date and time that the database node was created. + global::System.DateTime TimeCreated { get; set; } + /// End date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The OCID of the second VNIC. + string Vnic2Id { get; set; } + /// The OCID of the VNIC. + string VnicId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.json.cs new file mode 100644 index 000000000000..718bca309570 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbNodeProperties.json.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The properties of DbNodeResource + public partial class DbNodeProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodeProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_additionalDetail = If( json?.PropertyT("additionalDetails"), out var __jsonAdditionalDetails) ? (string)__jsonAdditionalDetails : (string)AdditionalDetail;} + {_backupIPId = If( json?.PropertyT("backupIpId"), out var __jsonBackupIPId) ? (string)__jsonBackupIPId : (string)BackupIPId;} + {_backupVnic2Id = If( json?.PropertyT("backupVnic2Id"), out var __jsonBackupVnic2Id) ? (string)__jsonBackupVnic2Id : (string)BackupVnic2Id;} + {_backupVnicId = If( json?.PropertyT("backupVnicId"), out var __jsonBackupVnicId) ? (string)__jsonBackupVnicId : (string)BackupVnicId;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : CpuCoreCount;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : DbNodeStorageSizeInGb;} + {_dbServerId = If( json?.PropertyT("dbServerId"), out var __jsonDbServerId) ? (string)__jsonDbServerId : (string)DbServerId;} + {_dbSystemId = If( json?.PropertyT("dbSystemId"), out var __jsonDbSystemId) ? (string)__jsonDbSystemId : (string)DbSystemId;} + {_faultDomain = If( json?.PropertyT("faultDomain"), out var __jsonFaultDomain) ? (string)__jsonFaultDomain : (string)FaultDomain;} + {_hostIPId = If( json?.PropertyT("hostIpId"), out var __jsonHostIPId) ? (string)__jsonHostIPId : (string)HostIPId;} + {_hostname = If( json?.PropertyT("hostname"), out var __jsonHostname) ? (string)__jsonHostname : (string)Hostname;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_maintenanceType = If( json?.PropertyT("maintenanceType"), out var __jsonMaintenanceType) ? (string)__jsonMaintenanceType : (string)MaintenanceType;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : MemorySizeInGb;} + {_softwareStorageSizeInGb = If( json?.PropertyT("softwareStorageSizeInGb"), out var __jsonSoftwareStorageSizeInGb) ? (int?)__jsonSoftwareStorageSizeInGb : SoftwareStorageSizeInGb;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : TimeCreated : TimeCreated;} + {_timeMaintenanceWindowEnd = If( json?.PropertyT("timeMaintenanceWindowEnd"), out var __jsonTimeMaintenanceWindowEnd) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceWindowEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceWindowEndValue) ? __jsonTimeMaintenanceWindowEndValue : TimeMaintenanceWindowEnd : TimeMaintenanceWindowEnd;} + {_timeMaintenanceWindowStart = If( json?.PropertyT("timeMaintenanceWindowStart"), out var __jsonTimeMaintenanceWindowStart) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceWindowStart, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceWindowStartValue) ? __jsonTimeMaintenanceWindowStartValue : TimeMaintenanceWindowStart : TimeMaintenanceWindowStart;} + {_vnic2Id = If( json?.PropertyT("vnic2Id"), out var __jsonVnic2Id) ? (string)__jsonVnic2Id : (string)Vnic2Id;} + {_vnicId = If( json?.PropertyT("vnicId"), out var __jsonVnicId) ? (string)__jsonVnicId : (string)VnicId;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbNodeProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + AddIf( null != (((object)this._additionalDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._additionalDetail.ToString()) : null, "additionalDetails" ,container.Add ); + AddIf( null != (((object)this._backupIPId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._backupIPId.ToString()) : null, "backupIpId" ,container.Add ); + AddIf( null != (((object)this._backupVnic2Id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._backupVnic2Id.ToString()) : null, "backupVnic2Id" ,container.Add ); + AddIf( null != (((object)this._backupVnicId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._backupVnicId.ToString()) : null, "backupVnicId" ,container.Add ); + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + AddIf( null != (((object)this._dbServerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbServerId.ToString()) : null, "dbServerId" ,container.Add ); + AddIf( null != (((object)this._dbSystemId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbSystemId.ToString()) : null, "dbSystemId" ,container.Add ); + AddIf( null != (((object)this._faultDomain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._faultDomain.ToString()) : null, "faultDomain" ,container.Add ); + AddIf( null != (((object)this._hostIPId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hostIPId.ToString()) : null, "hostIpId" ,container.Add ); + AddIf( null != (((object)this._hostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hostname.ToString()) : null, "hostname" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + AddIf( null != (((object)this._maintenanceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._maintenanceType.ToString()) : null, "maintenanceType" ,container.Add ); + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + AddIf( null != this._softwareStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._softwareStorageSizeInGb) : null, "softwareStorageSizeInGb" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "timeCreated" ,container.Add ); + AddIf( null != this._timeMaintenanceWindowEnd ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeMaintenanceWindowEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceWindowEnd" ,container.Add ); + AddIf( null != this._timeMaintenanceWindowStart ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeMaintenanceWindowStart?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceWindowStart" ,container.Add ); + AddIf( null != (((object)this._vnic2Id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._vnic2Id.ToString()) : null, "vnic2Id" ,container.Add ); + AddIf( null != (((object)this._vnicId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._vnicId.ToString()) : null, "vnicId" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.PowerShell.cs new file mode 100644 index 000000000000..af7388b17190 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.PowerShell.cs @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DbServer resource model + [System.ComponentModel.TypeConverter(typeof(DbServerTypeConverter))] + public partial class DbServer + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServer(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("PatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails) content.GetValueForProperty("PatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).VMClusterId = (string[]) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeId = (string[]) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState.CreateFrom); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVMClusterId = (string[]) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVirtualMachineId = (string[]) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + if (content.Contains("PatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("PatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailPatchingStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus?) content.GetValueForProperty("PatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailPatchingStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus.CreateFrom); + } + if (content.Contains("PatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServer(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("PatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails) content.GetValueForProperty("PatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).VMClusterId = (string[]) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeId = (string[]) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState.CreateFrom); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVMClusterId = (string[]) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVirtualMachineId = (string[]) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + if (content.Contains("PatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("PatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailPatchingStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus?) content.GetValueForProperty("PatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailPatchingStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus.CreateFrom); + } + if (content.Contains("PatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("PatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("PatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal)this).PatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServer(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServer(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DbServer resource model + [System.ComponentModel.TypeConverter(typeof(DbServerTypeConverter))] + public partial interface IDbServer + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.TypeConverter.cs new file mode 100644 index 000000000000..35ad68488144 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServer.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServer.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServer.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.cs new file mode 100644 index 000000000000..30be5daa17d8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.cs @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbServer resource model + public partial class DbServer : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] AutonomousVMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).AutonomousVMClusterId; } + + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] AutonomousVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).AutonomousVirtualMachineId; } + + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).CompartmentId; } + + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ComputeModel; } + + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).CpuCoreCount; } + + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] DbNodeId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbNodeId; } + + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbNodeStorageSizeInGb; } + + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DisplayName; } + + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ExadataInfrastructureId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ExadataInfrastructureId; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).LifecycleDetail; } + + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).LifecycleState; } + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxCpuCount; } + + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaxDbNodeStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxDbNodeStorageInGb; } + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxMemoryInGb; } + + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MemorySizeInGb; } + + /// Internal Acessors for AutonomousVMClusterId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.AutonomousVMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).AutonomousVMClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).AutonomousVMClusterId = value; } + + /// Internal Acessors for AutonomousVirtualMachineId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.AutonomousVirtualMachineId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).AutonomousVirtualMachineId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).AutonomousVirtualMachineId = value; } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.CompartmentId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).CompartmentId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).CompartmentId = value; } + + /// Internal Acessors for ComputeModel + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ComputeModel = value; } + + /// Internal Acessors for CpuCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).CpuCoreCount = value; } + + /// Internal Acessors for DbNodeId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.DbNodeId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbNodeId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbNodeId = value; } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbNodeStorageSizeInGb = value; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DisplayName = value; } + + /// Internal Acessors for ExadataInfrastructureId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.ExadataInfrastructureId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ExadataInfrastructureId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ExadataInfrastructureId = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.MaxCpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxCpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxCpuCount = value; } + + /// Internal Acessors for MaxDbNodeStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.MaxDbNodeStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxDbNodeStorageInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxDbNodeStorageInGb = value; } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.MaxMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxMemoryInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MaxMemoryInGb = value; } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).MemorySizeInGb = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for PatchingDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.PatchingDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetail = value; } + + /// Internal Acessors for PatchingDetailEstimatedPatchDuration + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.PatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailEstimatedPatchDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailEstimatedPatchDuration = value; } + + /// Internal Acessors for PatchingDetailPatchingStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.PatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailPatchingStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailPatchingStatus = value; } + + /// Internal Acessors for PatchingDetailTimePatchingEnded + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.PatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingEnded; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingEnded = value; } + + /// Internal Acessors for PatchingDetailTimePatchingStarted + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.PatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingStarted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingStarted = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).Shape = value; } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).TimeCreated = value; } + + /// Internal Acessors for VMClusterId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerInternal.VMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).VMClusterId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).VMClusterId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).Ocid; } + + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? PatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailEstimatedPatchDuration; } + + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? PatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailPatchingStatus; } + + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? PatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingEnded; } + + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? PatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).DbServerPatchingDetailTimePatchingStarted; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).ProvisioningState; } + + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).Shape; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).TimeCreated; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] VMClusterId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)Property).VMClusterId; } + + /// Creates an new instance. + public DbServer() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// DbServer resource model + public partial interface IDbServer : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of OCIDs of the Autonomous VM Clusters associated with the Db server.", + SerializedName = @"autonomousVmClusterIds", + PossibleTypes = new [] { typeof(string) })] + string[] AutonomousVMClusterId { get; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.", + SerializedName = @"autonomousVirtualMachineIds", + PossibleTypes = new [] { typeof(string) })] + string[] AutonomousVirtualMachineId { get; } + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the compartment.", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the Exadata Infrastructure", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; } + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of CPU cores enabled on the Db server.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; } + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Db nodes associated with the Db server.", + SerializedName = @"dbNodeIds", + PossibleTypes = new [] { typeof(string) })] + string[] DbNodeId { get; } + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The allocated local node storage in GBs on the Db server.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name for the Db Server.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Exadata infrastructure.", + SerializedName = @"exadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string ExadataInfrastructureId { get; } + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Lifecycle details of dbServer.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"DbServer provisioning state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? LifecycleState { get; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total max dbNode storage in GBs.", + SerializedName = @"maxDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total memory size in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Db server name.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Estimated Patch Duration", + SerializedName = @"estimatedPatchDuration", + PossibleTypes = new [] { typeof(int) })] + int? PatchingDetailEstimatedPatchDuration { get; } + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Patching Status", + SerializedName = @"patchingStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? PatchingDetailPatchingStatus { get; } + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Time Patching Ended", + SerializedName = @"timePatchingEnded", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PatchingDetailTimePatchingEnded { get; } + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Time Patching Started", + SerializedName = @"timePatchingStarted", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? PatchingDetailTimePatchingStarted { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time that the Db Server was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the VM Clusters associated with the Db server.", + SerializedName = @"vmClusterIds", + PossibleTypes = new [] { typeof(string) })] + string[] VMClusterId { get; } + + } + /// DbServer resource model + internal partial interface IDbServerInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + string[] AutonomousVMClusterId { get; set; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + string[] AutonomousVirtualMachineId { get; set; } + /// The OCID of the compartment. + string CompartmentId { get; set; } + /// The compute model of the Exadata Infrastructure + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The number of CPU cores enabled on the Db server. + int? CpuCoreCount { get; set; } + /// The OCID of the Db nodes associated with the Db server. + string[] DbNodeId { get; set; } + /// The allocated local node storage in GBs on the Db server. + int? DbNodeStorageSizeInGb { get; set; } + /// The name for the Db Server. + string DisplayName { get; set; } + /// The OCID of the Exadata infrastructure. + string ExadataInfrastructureId { get; set; } + /// Lifecycle details of dbServer. + string LifecycleDetail { get; set; } + /// DbServer provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? LifecycleState { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total max dbNode storage in GBs. + int? MaxDbNodeStorageInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The total memory size in GBs. + int? MemorySizeInGb { get; set; } + /// Db server name. + string Ocid { get; set; } + /// dbServerPatching details of the Db server. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails PatchingDetail { get; set; } + /// Estimated Patch Duration + int? PatchingDetailEstimatedPatchDuration { get; set; } + /// Patching Status + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? PatchingDetailPatchingStatus { get; set; } + /// Time Patching Ended + global::System.DateTime? PatchingDetailTimePatchingEnded { get; set; } + /// Time Patching Started + global::System.DateTime? PatchingDetailTimePatchingStarted { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties Property { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + string Shape { get; set; } + /// The date and time that the Db Server was created. + global::System.DateTime? TimeCreated { get; set; } + /// The OCID of the VM Clusters associated with the Db server. + string[] VMClusterId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.json.cs new file mode 100644 index 000000000000..15ae87fb65de --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServer.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbServer resource model + public partial class DbServer + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbServer(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbServer(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.PowerShell.cs new file mode 100644 index 000000000000..7d937f9724c2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a DbServer list operation. + [System.ComponentModel.TypeConverter(typeof(DbServerListResultTypeConverter))] + public partial class DbServerListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServerListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServerListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServerListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServerListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a DbServer list operation. + [System.ComponentModel.TypeConverter(typeof(DbServerListResultTypeConverter))] + public partial interface IDbServerListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.TypeConverter.cs new file mode 100644 index 000000000000..8c2fc2ddccf2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServerListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServerListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServerListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.cs new file mode 100644 index 000000000000..b4c6ee528605 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DbServer list operation. + public partial class DbServerListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer[] _value; + + /// The DbServer items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DbServerListResult() + { + + } + } + /// The response of a DbServer list operation. + public partial interface IDbServerListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DbServer items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DbServer items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer[] Value { get; set; } + + } + /// The response of a DbServer list operation. + internal partial interface IDbServerListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DbServer items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.json.cs new file mode 100644 index 000000000000..fc92fc509745 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DbServer list operation. + public partial class DbServerListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbServerListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServer.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbServerListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.PowerShell.cs new file mode 100644 index 000000000000..ca7aab0ae622 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DbServer Patching Properties + [System.ComponentModel.TypeConverter(typeof(DbServerPatchingDetailsTypeConverter))] + public partial class DbServerPatchingDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServerPatchingDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration = (int?) content.GetValueForProperty("EstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).PatchingStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus?) content.GetValueForProperty("PatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).PatchingStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus.CreateFrom); + } + if (content.Contains("TimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("TimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("TimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServerPatchingDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration = (int?) content.GetValueForProperty("EstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).EstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).PatchingStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus?) content.GetValueForProperty("PatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).PatchingStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus.CreateFrom); + } + if (content.Contains("TimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("TimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("TimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)this).TimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServerPatchingDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServerPatchingDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DbServer Patching Properties + [System.ComponentModel.TypeConverter(typeof(DbServerPatchingDetailsTypeConverter))] + public partial interface IDbServerPatchingDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.TypeConverter.cs new file mode 100644 index 000000000000..875939096d49 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerPatchingDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServerPatchingDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServerPatchingDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServerPatchingDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.cs new file mode 100644 index 000000000000..57f6f7b57a09 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbServer Patching Properties + public partial class DbServerPatchingDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal + { + + /// Backing field for property. + private int? _estimatedPatchDuration; + + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? EstimatedPatchDuration { get => this._estimatedPatchDuration; } + + /// Internal Acessors for EstimatedPatchDuration + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal.EstimatedPatchDuration { get => this._estimatedPatchDuration; set { {_estimatedPatchDuration = value;} } } + + /// Internal Acessors for PatchingStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal.PatchingStatus { get => this._patchingStatus; set { {_patchingStatus = value;} } } + + /// Internal Acessors for TimePatchingEnded + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal.TimePatchingEnded { get => this._timePatchingEnded; set { {_timePatchingEnded = value;} } } + + /// Internal Acessors for TimePatchingStarted + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal.TimePatchingStarted { get => this._timePatchingStarted; set { {_timePatchingStarted = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? _patchingStatus; + + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? PatchingStatus { get => this._patchingStatus; } + + /// Backing field for property. + private global::System.DateTime? _timePatchingEnded; + + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimePatchingEnded { get => this._timePatchingEnded; } + + /// Backing field for property. + private global::System.DateTime? _timePatchingStarted; + + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimePatchingStarted { get => this._timePatchingStarted; } + + /// Creates an new instance. + public DbServerPatchingDetails() + { + + } + } + /// DbServer Patching Properties + public partial interface IDbServerPatchingDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Estimated Patch Duration", + SerializedName = @"estimatedPatchDuration", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedPatchDuration { get; } + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Patching Status", + SerializedName = @"patchingStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? PatchingStatus { get; } + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Time Patching Ended", + SerializedName = @"timePatchingEnded", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimePatchingEnded { get; } + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Time Patching Started", + SerializedName = @"timePatchingStarted", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimePatchingStarted { get; } + + } + /// DbServer Patching Properties + internal partial interface IDbServerPatchingDetailsInternal + + { + /// Estimated Patch Duration + int? EstimatedPatchDuration { get; set; } + /// Patching Status + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? PatchingStatus { get; set; } + /// Time Patching Ended + global::System.DateTime? TimePatchingEnded { get; set; } + /// Time Patching Started + global::System.DateTime? TimePatchingStarted { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.json.cs new file mode 100644 index 000000000000..6419945e1106 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerPatchingDetails.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbServer Patching Properties + public partial class DbServerPatchingDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbServerPatchingDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_estimatedPatchDuration = If( json?.PropertyT("estimatedPatchDuration"), out var __jsonEstimatedPatchDuration) ? (int?)__jsonEstimatedPatchDuration : EstimatedPatchDuration;} + {_patchingStatus = If( json?.PropertyT("patchingStatus"), out var __jsonPatchingStatus) ? (string)__jsonPatchingStatus : (string)PatchingStatus;} + {_timePatchingEnded = If( json?.PropertyT("timePatchingEnded"), out var __jsonTimePatchingEnded) ? global::System.DateTime.TryParse((string)__jsonTimePatchingEnded, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimePatchingEndedValue) ? __jsonTimePatchingEndedValue : TimePatchingEnded : TimePatchingEnded;} + {_timePatchingStarted = If( json?.PropertyT("timePatchingStarted"), out var __jsonTimePatchingStarted) ? global::System.DateTime.TryParse((string)__jsonTimePatchingStarted, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimePatchingStartedValue) ? __jsonTimePatchingStartedValue : TimePatchingStarted : TimePatchingStarted;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbServerPatchingDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._estimatedPatchDuration ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._estimatedPatchDuration) : null, "estimatedPatchDuration" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._patchingStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._patchingStatus.ToString()) : null, "patchingStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timePatchingEnded ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timePatchingEnded?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timePatchingEnded" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timePatchingStarted ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timePatchingStarted?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timePatchingStarted" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.PowerShell.cs new file mode 100644 index 000000000000..feb9982726c8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.PowerShell.cs @@ -0,0 +1,338 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DbServer resource properties + [System.ComponentModel.TypeConverter(typeof(DbServerPropertiesTypeConverter))] + public partial class DbServerProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbServerProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServerPatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails) content.GetValueForProperty("DbServerPatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).VMClusterId = (string[]) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeId = (string[]) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState.CreateFrom); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVMClusterId = (string[]) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId = (string[]) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("DbServerPatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("DbServerPatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerPatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus?) content.GetValueForProperty("DbServerPatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus.CreateFrom); + } + if (content.Contains("DbServerPatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DbServerPatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbServerProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbServerPatchingDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails) content.GetValueForProperty("DbServerPatchingDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetail, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("CompartmentId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CompartmentId = (string) content.GetValueForProperty("CompartmentId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CompartmentId, global::System.Convert.ToString); + } + if (content.Contains("ExadataInfrastructureId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ExadataInfrastructureId = (string) content.GetValueForProperty("ExadataInfrastructureId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ExadataInfrastructureId, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxMemoryInGb = (int?) content.GetValueForProperty("MaxMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).VMClusterId = (string[]) content.GetValueForProperty("VMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).VMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("DbNodeId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeId = (string[]) content.GetValueForProperty("DbNodeId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbNodeId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState.CreateFrom); + } + if (content.Contains("MaxCpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxCpuCount = (int?) content.GetValueForProperty("MaxCpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxCpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AutonomousVMClusterId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVMClusterId = (string[]) content.GetValueForProperty("AutonomousVMClusterId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVMClusterId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AutonomousVirtualMachineId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId = (string[]) content.GetValueForProperty("AutonomousVirtualMachineId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).AutonomousVirtualMachineId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("MaxDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb = (int?) content.GetValueForProperty("MaxDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MaxDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("DbServerPatchingDetailEstimatedPatchDuration")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration = (int?) content.GetValueForProperty("DbServerPatchingDetailEstimatedPatchDuration",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailEstimatedPatchDuration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbServerPatchingDetailPatchingStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus?) content.GetValueForProperty("DbServerPatchingDetailPatchingStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailPatchingStatus, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus.CreateFrom); + } + if (content.Contains("DbServerPatchingDetailTimePatchingEnded")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingEnded",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingEnded, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("DbServerPatchingDetailTimePatchingStarted")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted = (global::System.DateTime?) content.GetValueForProperty("DbServerPatchingDetailTimePatchingStarted",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal)this).DbServerPatchingDetailTimePatchingStarted, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbServerProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbServerProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DbServer resource properties + [System.ComponentModel.TypeConverter(typeof(DbServerPropertiesTypeConverter))] + public partial interface IDbServerProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.TypeConverter.cs new file mode 100644 index 000000000000..8637abf2e354 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbServerPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbServerProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbServerProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbServerProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.cs new file mode 100644 index 000000000000..447d016468d9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbServer resource properties + public partial class DbServerProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal + { + + /// Backing field for property. + private string[] _autonomousVMClusterId; + + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] AutonomousVMClusterId { get => this._autonomousVMClusterId; } + + /// Backing field for property. + private string[] _autonomousVirtualMachineId; + + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] AutonomousVirtualMachineId { get => this._autonomousVirtualMachineId; } + + /// Backing field for property. + private string _compartmentId; + + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CompartmentId { get => this._compartmentId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? _computeModel; + + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => this._computeModel; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; } + + /// Backing field for property. + private string[] _dbNodeId; + + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] DbNodeId { get => this._dbNodeId; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails _dbServerPatchingDetail; + + /// dbServerPatching details of the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails DbServerPatchingDetail { get => (this._dbServerPatchingDetail = this._dbServerPatchingDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetails()); } + + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DbServerPatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).EstimatedPatchDuration; } + + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? DbServerPatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).PatchingStatus; } + + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? DbServerPatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingEnded; } + + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? DbServerPatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingStarted; } + + /// Backing field for property. + private string _displayName; + + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; } + + /// Backing field for property. + private string _exadataInfrastructureId; + + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ExadataInfrastructureId { get => this._exadataInfrastructureId; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? _lifecycleState; + + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private int? _maxCpuCount; + + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaxCpuCount { get => this._maxCpuCount; } + + /// Backing field for property. + private int? _maxDbNodeStorageInGb; + + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaxDbNodeStorageInGb { get => this._maxDbNodeStorageInGb; } + + /// Backing field for property. + private int? _maxMemoryInGb; + + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaxMemoryInGb { get => this._maxMemoryInGb; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; } + + /// Internal Acessors for AutonomousVMClusterId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.AutonomousVMClusterId { get => this._autonomousVMClusterId; set { {_autonomousVMClusterId = value;} } } + + /// Internal Acessors for AutonomousVirtualMachineId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.AutonomousVirtualMachineId { get => this._autonomousVirtualMachineId; set { {_autonomousVirtualMachineId = value;} } } + + /// Internal Acessors for CompartmentId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.CompartmentId { get => this._compartmentId; set { {_compartmentId = value;} } } + + /// Internal Acessors for ComputeModel + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.ComputeModel { get => this._computeModel; set { {_computeModel = value;} } } + + /// Internal Acessors for CpuCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.CpuCoreCount { get => this._cpuCoreCount; set { {_cpuCoreCount = value;} } } + + /// Internal Acessors for DbNodeId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DbNodeId { get => this._dbNodeId; set { {_dbNodeId = value;} } } + + /// Internal Acessors for DbNodeStorageSizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set { {_dbNodeStorageSizeInGb = value;} } } + + /// Internal Acessors for DbServerPatchingDetail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DbServerPatchingDetail { get => (this._dbServerPatchingDetail = this._dbServerPatchingDetail ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetails()); set { {_dbServerPatchingDetail = value;} } } + + /// Internal Acessors for DbServerPatchingDetailEstimatedPatchDuration + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DbServerPatchingDetailEstimatedPatchDuration { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).EstimatedPatchDuration; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).EstimatedPatchDuration = value; } + + /// Internal Acessors for DbServerPatchingDetailPatchingStatus + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DbServerPatchingDetailPatchingStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).PatchingStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).PatchingStatus = value; } + + /// Internal Acessors for DbServerPatchingDetailTimePatchingEnded + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DbServerPatchingDetailTimePatchingEnded { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingEnded; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingEnded = value; } + + /// Internal Acessors for DbServerPatchingDetailTimePatchingStarted + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DbServerPatchingDetailTimePatchingStarted { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingStarted; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetailsInternal)DbServerPatchingDetail).TimePatchingStarted = value; } + + /// Internal Acessors for DisplayName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.DisplayName { get => this._displayName; set { {_displayName = value;} } } + + /// Internal Acessors for ExadataInfrastructureId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.ExadataInfrastructureId { get => this._exadataInfrastructureId; set { {_exadataInfrastructureId = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for MaxCpuCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.MaxCpuCount { get => this._maxCpuCount; set { {_maxCpuCount = value;} } } + + /// Internal Acessors for MaxDbNodeStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.MaxDbNodeStorageInGb { get => this._maxDbNodeStorageInGb; set { {_maxDbNodeStorageInGb = value;} } } + + /// Internal Acessors for MaxMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.MaxMemoryInGb { get => this._maxMemoryInGb; set { {_maxMemoryInGb = value;} } } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.MemorySizeInGb { get => this._memorySizeInGb; set { {_memorySizeInGb = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.Shape { get => this._shape; set { {_shape = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Internal Acessors for VMClusterId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPropertiesInternal.VMClusterId { get => this._vMClusterId; set { {_vMClusterId = value;} } } + + /// Backing field for property. + private string _ocid; + + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _shape; + + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Shape { get => this._shape; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Backing field for property. + private string[] _vMClusterId; + + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] VMClusterId { get => this._vMClusterId; } + + /// Creates an new instance. + public DbServerProperties() + { + + } + } + /// DbServer resource properties + public partial interface IDbServerProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of OCIDs of the Autonomous VM Clusters associated with the Db server.", + SerializedName = @"autonomousVmClusterIds", + PossibleTypes = new [] { typeof(string) })] + string[] AutonomousVMClusterId { get; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The list of OCIDs of the Autonomous Virtual Machines associated with the Db server.", + SerializedName = @"autonomousVirtualMachineIds", + PossibleTypes = new [] { typeof(string) })] + string[] AutonomousVirtualMachineId { get; } + /// The OCID of the compartment. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the compartment.", + SerializedName = @"compartmentId", + PossibleTypes = new [] { typeof(string) })] + string CompartmentId { get; } + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the Exadata Infrastructure", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; } + /// The number of CPU cores enabled on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of CPU cores enabled on the Db server.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; } + /// The OCID of the Db nodes associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Db nodes associated with the Db server.", + SerializedName = @"dbNodeIds", + PossibleTypes = new [] { typeof(string) })] + string[] DbNodeId { get; } + /// The allocated local node storage in GBs on the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The allocated local node storage in GBs on the Db server.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; } + /// Estimated Patch Duration + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Estimated Patch Duration", + SerializedName = @"estimatedPatchDuration", + PossibleTypes = new [] { typeof(int) })] + int? DbServerPatchingDetailEstimatedPatchDuration { get; } + /// Patching Status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Patching Status", + SerializedName = @"patchingStatus", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? DbServerPatchingDetailPatchingStatus { get; } + /// Time Patching Ended + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Time Patching Ended", + SerializedName = @"timePatchingEnded", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DbServerPatchingDetailTimePatchingEnded { get; } + /// Time Patching Started + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Time Patching Started", + SerializedName = @"timePatchingStarted", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? DbServerPatchingDetailTimePatchingStarted { get; } + /// The name for the Db Server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name for the Db Server.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; } + /// The OCID of the Exadata infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Exadata infrastructure.", + SerializedName = @"exadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + string ExadataInfrastructureId { get; } + /// Lifecycle details of dbServer. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Lifecycle details of dbServer.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// DbServer provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"DbServer provisioning state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? LifecycleState { get; } + /// The total number of CPU cores available. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total number of CPU cores available.", + SerializedName = @"maxCpuCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCpuCount { get; } + /// The total max dbNode storage in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total max dbNode storage in GBs.", + SerializedName = @"maxDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxDbNodeStorageInGb { get; } + /// The total memory available in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total memory available in GBs.", + SerializedName = @"maxMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MaxMemoryInGb { get; } + /// The total memory size in GBs. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The total memory size in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// Db server name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Db server name.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + /// The date and time that the Db Server was created. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time that the Db Server was created.", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + /// The OCID of the VM Clusters associated with the Db server. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the VM Clusters associated with the Db server.", + SerializedName = @"vmClusterIds", + PossibleTypes = new [] { typeof(string) })] + string[] VMClusterId { get; } + + } + /// DbServer resource properties + internal partial interface IDbServerPropertiesInternal + + { + /// The list of OCIDs of the Autonomous VM Clusters associated with the Db server. + string[] AutonomousVMClusterId { get; set; } + /// + /// The list of OCIDs of the Autonomous Virtual Machines associated with the Db server. + /// + string[] AutonomousVirtualMachineId { get; set; } + /// The OCID of the compartment. + string CompartmentId { get; set; } + /// The compute model of the Exadata Infrastructure + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// The number of CPU cores enabled on the Db server. + int? CpuCoreCount { get; set; } + /// The OCID of the Db nodes associated with the Db server. + string[] DbNodeId { get; set; } + /// The allocated local node storage in GBs on the Db server. + int? DbNodeStorageSizeInGb { get; set; } + /// dbServerPatching details of the Db server. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerPatchingDetails DbServerPatchingDetail { get; set; } + /// Estimated Patch Duration + int? DbServerPatchingDetailEstimatedPatchDuration { get; set; } + /// Patching Status + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus? DbServerPatchingDetailPatchingStatus { get; set; } + /// Time Patching Ended + global::System.DateTime? DbServerPatchingDetailTimePatchingEnded { get; set; } + /// Time Patching Started + global::System.DateTime? DbServerPatchingDetailTimePatchingStarted { get; set; } + /// The name for the Db Server. + string DisplayName { get; set; } + /// The OCID of the Exadata infrastructure. + string ExadataInfrastructureId { get; set; } + /// Lifecycle details of dbServer. + string LifecycleDetail { get; set; } + /// DbServer provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState? LifecycleState { get; set; } + /// The total number of CPU cores available. + int? MaxCpuCount { get; set; } + /// The total max dbNode storage in GBs. + int? MaxDbNodeStorageInGb { get; set; } + /// The total memory available in GBs. + int? MaxMemoryInGb { get; set; } + /// The total memory size in GBs. + int? MemorySizeInGb { get; set; } + /// Db server name. + string Ocid { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// + /// The shape of the Db server. The shape determines the amount of CPU, storage, and memory resources available. + /// + string Shape { get; set; } + /// The date and time that the Db Server was created. + global::System.DateTime? TimeCreated { get; set; } + /// The OCID of the VM Clusters associated with the Db server. + string[] VMClusterId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.json.cs new file mode 100644 index 000000000000..21e5fa6f5b23 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbServerProperties.json.cs @@ -0,0 +1,243 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbServer resource properties + public partial class DbServerProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbServerProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbServerPatchingDetail = If( json?.PropertyT("dbServerPatchingDetails"), out var __jsonDbServerPatchingDetails) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerPatchingDetails.FromJson(__jsonDbServerPatchingDetails) : DbServerPatchingDetail;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_compartmentId = If( json?.PropertyT("compartmentId"), out var __jsonCompartmentId) ? (string)__jsonCompartmentId : (string)CompartmentId;} + {_exadataInfrastructureId = If( json?.PropertyT("exadataInfrastructureId"), out var __jsonExadataInfrastructureId) ? (string)__jsonExadataInfrastructureId : (string)ExadataInfrastructureId;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : CpuCoreCount;} + {_maxMemoryInGb = If( json?.PropertyT("maxMemoryInGbs"), out var __jsonMaxMemoryInGbs) ? (int?)__jsonMaxMemoryInGbs : MaxMemoryInGb;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : DbNodeStorageSizeInGb;} + {_vMClusterId = If( json?.PropertyT("vmClusterIds"), out var __jsonVMClusterIds) ? If( __jsonVMClusterIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : VMClusterId;} + {_dbNodeId = If( json?.PropertyT("dbNodeIds"), out var __jsonDbNodeIds) ? If( __jsonDbNodeIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : DbNodeId;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_maxCpuCount = If( json?.PropertyT("maxCpuCount"), out var __jsonMaxCpuCount) ? (int?)__jsonMaxCpuCount : MaxCpuCount;} + {_autonomousVMClusterId = If( json?.PropertyT("autonomousVmClusterIds"), out var __jsonAutonomousVMClusterIds) ? If( __jsonAutonomousVMClusterIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : AutonomousVMClusterId;} + {_autonomousVirtualMachineId = If( json?.PropertyT("autonomousVirtualMachineIds"), out var __jsonAutonomousVirtualMachineIds) ? If( __jsonAutonomousVirtualMachineIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : AutonomousVirtualMachineId;} + {_maxDbNodeStorageInGb = If( json?.PropertyT("maxDbNodeStorageInGbs"), out var __jsonMaxDbNodeStorageInGbs) ? (int?)__jsonMaxDbNodeStorageInGbs : MaxDbNodeStorageInGb;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : MemorySizeInGb;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)Shape;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : TimeCreated : TimeCreated;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_computeModel = If( json?.PropertyT("computeModel"), out var __jsonComputeModel) ? (string)__jsonComputeModel : (string)ComputeModel;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbServerProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._dbServerPatchingDetail ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._dbServerPatchingDetail.ToJson(null,serializationMode) : null, "dbServerPatchingDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._compartmentId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._compartmentId.ToString()) : null, "compartmentId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._exadataInfrastructureId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._exadataInfrastructureId.ToString()) : null, "exadataInfrastructureId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._maxMemoryInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maxMemoryInGb) : null, "maxMemoryInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._vMClusterId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._vMClusterId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("vmClusterIds",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._dbNodeId) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._dbNodeId ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("dbNodeIds",__r); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._maxCpuCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maxCpuCount) : null, "maxCpuCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._autonomousVMClusterId) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __n in this._autonomousVMClusterId ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("autonomousVmClusterIds",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._autonomousVirtualMachineId) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __i in this._autonomousVirtualMachineId ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("autonomousVirtualMachineIds",__h); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._maxDbNodeStorageInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maxDbNodeStorageInGb) : null, "maxDbNodeStorageInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._computeModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._computeModel.ToString()) : null, "computeModel" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.PowerShell.cs new file mode 100644 index 000000000000..a46dd73cfce4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.PowerShell.cs @@ -0,0 +1,418 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DbSystemShape resource definition + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeTypeConverter))] + public partial class DbSystemShape + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbSystemShape(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("ShapeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeName = (string) content.GetValueForProperty("ShapeName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeName, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCount = (int) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AreServerTypesSupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AreServerTypesSupported = (bool?) content.GetValueForProperty("AreServerTypesSupported",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AreServerTypesSupported, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).DisplayName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbSystemShape(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("ShapeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeName = (string) content.GetValueForProperty("ShapeName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).ShapeName, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCount = (int) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AreServerTypesSupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AreServerTypesSupported = (bool?) content.GetValueForProperty("AreServerTypesSupported",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).AreServerTypesSupported, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal)this).DisplayName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbSystemShape(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbSystemShape(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DbSystemShape resource definition + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeTypeConverter))] + public partial interface IDbSystemShape + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.TypeConverter.cs new file mode 100644 index 000000000000..e4e1e23a8c07 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbSystemShapeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbSystemShape.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbSystemShape.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbSystemShape.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.cs new file mode 100644 index 000000000000..60069356eebc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbSystemShape resource definition + public partial class DbSystemShape : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// Indicates if the shape supports database and storage server types + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? AreServerTypesSupported { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AreServerTypesSupported; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AreServerTypesSupported = value ?? default(bool); } + + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableCoreCount = value ?? default(int); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableCoreCountPerNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableCoreCountPerNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableCoreCountPerNode = value ?? default(int); } + + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDataStorageInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDataStorageInTb = value ?? default(int); } + + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public double? AvailableDataStoragePerServerInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDataStoragePerServerInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDataStoragePerServerInTb = value ?? default(double); } + + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableDbNodePerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDbNodePerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDbNodePerNodeInGb = value ?? default(int); } + + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableDbNodeStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDbNodeStorageInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableDbNodeStorageInGb = value ?? default(int); } + + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableMemoryInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableMemoryInGb = value ?? default(int); } + + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableMemoryPerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableMemoryPerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).AvailableMemoryPerNodeInGb = value ?? default(int); } + + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).ComputeModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel)""); } + + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CoreCountIncrement { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).CoreCountIncrement; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).CoreCountIncrement = value ?? default(int); } + + /// The display name of the shape used for the DB system + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaxStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MaxStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MaxStorageCount = value ?? default(int); } + + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MaximumNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MaximumNodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MaximumNodeCount = value ?? default(int); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinCoreCountPerNode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinCoreCountPerNode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinCoreCountPerNode = value ?? default(int); } + + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinDataStorageInTb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinDataStorageInTb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinDataStorageInTb = value ?? default(int); } + + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinDbNodeStoragePerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinDbNodeStoragePerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinDbNodeStoragePerNodeInGb = value ?? default(int); } + + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinMemoryPerNodeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinMemoryPerNodeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinMemoryPerNodeInGb = value ?? default(int); } + + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinStorageCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinStorageCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinStorageCount = value ?? default(int); } + + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinimumCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinimumCoreCount = value ?? default(int); } + + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinimumNodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinimumNodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).MinimumNodeCount = value ?? default(int); } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeProperties()); set => this._property = value; } + + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? RuntimeMinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).RuntimeMinimumCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).RuntimeMinimumCoreCount = value ?? default(int); } + + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ShapeFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).ShapeFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).ShapeFamily = value ?? null; } + + /// The shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ShapeName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).ShapeName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)Property).ShapeName = value ?? null; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public DbSystemShape() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// DbSystemShape resource definition + public partial interface IDbSystemShape : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// Indicates if the shape supports database and storage server types + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the shape supports database and storage server types", + SerializedName = @"areServerTypesSupported", + PossibleTypes = new [] { typeof(bool) })] + bool? AreServerTypesSupported { get; set; } + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"availableCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCount { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"availableCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCountPerNode { get; set; } + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum DATA storage that can be enabled for this shape.", + SerializedName = @"availableDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDataStorageInTb { get; set; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDataStoragePerServerInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AvailableDataStoragePerServerInTb { get; set; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDbNodePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodePerNodeInGb { get; set; } + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum Db Node storage that can be enabled for this shape.", + SerializedName = @"availableDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodeStorageInGb { get; set; } + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum memory that can be enabled for this shape.", + SerializedName = @"availableMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryInGb { get; set; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryPerNodeInGb { get; set; } + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute model of the Exadata Infrastructure", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discrete number by which the CPU core count for this shape can be increased or decreased.", + SerializedName = @"coreCountIncrement", + PossibleTypes = new [] { typeof(int) })] + int? CoreCountIncrement { get; set; } + /// The display name of the shape used for the DB system + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the shape used for the DB system", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"maxStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxStorageCount { get; set; } + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of database nodes available for this shape.", + SerializedName = @"maximumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MaximumNodeCount { get; set; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of CPU cores that can be enabled per node for this shape.", + SerializedName = @"minCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? MinCoreCountPerNode { get; set; } + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum data storage that need be allocated for this shape.", + SerializedName = @"minDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDataStorageInTb { get; set; } + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum Db Node storage that need be allocated per node for this shape.", + SerializedName = @"minDbNodeStoragePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDbNodeStoragePerNodeInGb { get; set; } + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum memory that need be allocated per node for this shape.", + SerializedName = @"minMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinMemoryPerNodeInGb { get; set; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"minStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MinStorageCount { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"minimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumCoreCount { get; set; } + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of database nodes available for this shape.", + SerializedName = @"minimumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumNodeCount { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The runtime minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"runtimeMinimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? RuntimeMinimumCoreCount { get; set; } + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The family of the shape used for the DB system.", + SerializedName = @"shapeFamily", + PossibleTypes = new [] { typeof(string) })] + string ShapeFamily { get; set; } + /// The shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The shape used for the DB system.", + SerializedName = @"shapeName", + PossibleTypes = new [] { typeof(string) })] + string ShapeName { get; set; } + + } + /// DbSystemShape resource definition + internal partial interface IDbSystemShapeInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// Indicates if the shape supports database and storage server types + bool? AreServerTypesSupported { get; set; } + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? AvailableCoreCount { get; set; } + /// + /// 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. + /// + int? AvailableCoreCountPerNode { get; set; } + /// The maximum DATA storage that can be enabled for this shape. + int? AvailableDataStorageInTb { get; set; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + double? AvailableDataStoragePerServerInTb { get; set; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableDbNodePerNodeInGb { get; set; } + /// The maximum Db Node storage that can be enabled for this shape. + int? AvailableDbNodeStorageInGb { get; set; } + /// The maximum memory that can be enabled for this shape. + int? AvailableMemoryInGb { get; set; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableMemoryPerNodeInGb { get; set; } + /// The compute model of the Exadata Infrastructure + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + int? CoreCountIncrement { get; set; } + /// The display name of the shape used for the DB system + string DisplayName { get; set; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MaxStorageCount { get; set; } + /// The maximum number of database nodes available for this shape. + int? MaximumNodeCount { get; set; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + int? MinCoreCountPerNode { get; set; } + /// The minimum data storage that need be allocated for this shape. + int? MinDataStorageInTb { get; set; } + /// The minimum Db Node storage that need be allocated per node for this shape. + int? MinDbNodeStoragePerNodeInGb { get; set; } + /// The minimum memory that need be allocated per node for this shape. + int? MinMemoryPerNodeInGb { get; set; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MinStorageCount { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? MinimumCoreCount { get; set; } + /// The minimum number of database nodes available for this shape. + int? MinimumNodeCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties Property { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? RuntimeMinimumCoreCount { get; set; } + /// The family of the shape used for the DB system. + string ShapeFamily { get; set; } + /// The shape used for the DB system. + string ShapeName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.json.cs new file mode 100644 index 000000000000..7d8ee2ed3c71 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShape.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbSystemShape resource definition + public partial class DbSystemShape + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbSystemShape(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbSystemShape(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.PowerShell.cs new file mode 100644 index 000000000000..f148f134d349 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a DbSystemShape list operation. + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeListResultTypeConverter))] + public partial class DbSystemShapeListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbSystemShapeListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbSystemShapeListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbSystemShapeListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbSystemShapeListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a DbSystemShape list operation. + [System.ComponentModel.TypeConverter(typeof(DbSystemShapeListResultTypeConverter))] + public partial interface IDbSystemShapeListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.TypeConverter.cs new file mode 100644 index 000000000000..ad95357d8083 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbSystemShapeListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbSystemShapeListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbSystemShapeListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbSystemShapeListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.cs new file mode 100644 index 000000000000..e761d20bbb99 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DbSystemShape list operation. + public partial class DbSystemShapeListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape[] _value; + + /// The DbSystemShape items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DbSystemShapeListResult() + { + + } + } + /// The response of a DbSystemShape list operation. + public partial interface IDbSystemShapeListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DbSystemShape items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DbSystemShape items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape[] Value { get; set; } + + } + /// The response of a DbSystemShape list operation. + internal partial interface IDbSystemShapeListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DbSystemShape items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.json.cs new file mode 100644 index 000000000000..c666260915ab --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DbSystemShape list operation. + public partial class DbSystemShapeListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbSystemShapeListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShape.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbSystemShapeListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.PowerShell.cs new file mode 100644 index 000000000000..ca459a7eb84c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.PowerShell.cs @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DbSystemShape resource model + [System.ComponentModel.TypeConverter(typeof(DbSystemShapePropertiesTypeConverter))] + public partial class DbSystemShapeProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbSystemShapeProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("ShapeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeName = (string) content.GetValueForProperty("ShapeName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeName, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCount = (int) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("AreServerTypesSupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AreServerTypesSupported = (bool?) content.GetValueForProperty("AreServerTypesSupported",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AreServerTypesSupported, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbSystemShapeProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ShapeFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeFamily = (string) content.GetValueForProperty("ShapeFamily",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeFamily, global::System.Convert.ToString); + } + if (content.Contains("ShapeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeName = (string) content.GetValueForProperty("ShapeName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ShapeName, global::System.Convert.ToString); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCount = (int) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CoreCountIncrement")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).CoreCountIncrement = (int?) content.GetValueForProperty("CoreCountIncrement",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).CoreCountIncrement, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinStorageCount = (int?) content.GetValueForProperty("MinStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaxStorageCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaxStorageCount = (int?) content.GetValueForProperty("MaxStorageCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaxStorageCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStoragePerServerInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb = (double?) content.GetValueForProperty("AvailableDataStoragePerServerInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStoragePerServerInTb, (__y)=> (double) global::System.Convert.ChangeType(__y, typeof(double))); + } + if (content.Contains("AvailableMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb = (int?) content.GetValueForProperty("AvailableMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb = (int?) content.GetValueForProperty("AvailableDbNodePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode = (int?) content.GetValueForProperty("MinCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinMemoryPerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb = (int?) content.GetValueForProperty("MinMemoryPerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinMemoryPerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbNodeStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb = (int?) content.GetValueForProperty("AvailableDbNodeStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDbNodeStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDbNodeStoragePerNodeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb = (int?) content.GetValueForProperty("MinDbNodeStoragePerNodeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDbNodeStoragePerNodeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb = (int?) content.GetValueForProperty("AvailableDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinDataStorageInTb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb = (int?) content.GetValueForProperty("MinDataStorageInTb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinDataStorageInTb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinimumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumNodeCount = (int?) content.GetValueForProperty("MinimumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MinimumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MaximumNodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaximumNodeCount = (int?) content.GetValueForProperty("MaximumNodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).MaximumNodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCountPerNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode = (int?) content.GetValueForProperty("AvailableCoreCountPerNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AvailableCoreCountPerNode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ComputeModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel?) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).ComputeModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel.CreateFrom); + } + if (content.Contains("AreServerTypesSupported")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AreServerTypesSupported = (bool?) content.GetValueForProperty("AreServerTypesSupported",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).AreServerTypesSupported, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbSystemShapeProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbSystemShapeProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DbSystemShape resource model + [System.ComponentModel.TypeConverter(typeof(DbSystemShapePropertiesTypeConverter))] + public partial interface IDbSystemShapeProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.TypeConverter.cs new file mode 100644 index 000000000000..6d049210f3b1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbSystemShapePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbSystemShapeProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbSystemShapeProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbSystemShapeProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.cs new file mode 100644 index 000000000000..f783bf2cedbb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbSystemShape resource model + public partial class DbSystemShapeProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapePropertiesInternal + { + + /// Backing field for property. + private bool? _areServerTypesSupported; + + /// Indicates if the shape supports database and storage server types + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? AreServerTypesSupported { get => this._areServerTypesSupported; set => this._areServerTypesSupported = value; } + + /// Backing field for property. + private int _availableCoreCount; + + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int AvailableCoreCount { get => this._availableCoreCount; set => this._availableCoreCount = value; } + + /// Backing field for property. + private int? _availableCoreCountPerNode; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableCoreCountPerNode { get => this._availableCoreCountPerNode; set => this._availableCoreCountPerNode = value; } + + /// Backing field for property. + private int? _availableDataStorageInTb; + + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableDataStorageInTb { get => this._availableDataStorageInTb; set => this._availableDataStorageInTb = value; } + + /// Backing field for property. + private double? _availableDataStoragePerServerInTb; + + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public double? AvailableDataStoragePerServerInTb { get => this._availableDataStoragePerServerInTb; set => this._availableDataStoragePerServerInTb = value; } + + /// Backing field for property. + private int? _availableDbNodePerNodeInGb; + + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableDbNodePerNodeInGb { get => this._availableDbNodePerNodeInGb; set => this._availableDbNodePerNodeInGb = value; } + + /// Backing field for property. + private int? _availableDbNodeStorageInGb; + + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableDbNodeStorageInGb { get => this._availableDbNodeStorageInGb; set => this._availableDbNodeStorageInGb = value; } + + /// Backing field for property. + private int? _availableMemoryInGb; + + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableMemoryInGb { get => this._availableMemoryInGb; set => this._availableMemoryInGb = value; } + + /// Backing field for property. + private int? _availableMemoryPerNodeInGb; + + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableMemoryPerNodeInGb { get => this._availableMemoryPerNodeInGb; set => this._availableMemoryPerNodeInGb = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? _computeModel; + + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get => this._computeModel; set => this._computeModel = value; } + + /// Backing field for property. + private int? _coreCountIncrement; + + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CoreCountIncrement { get => this._coreCountIncrement; set => this._coreCountIncrement = value; } + + /// Backing field for property. + private string _displayName; + + /// The display name of the shape used for the DB system + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private int? _maxStorageCount; + + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaxStorageCount { get => this._maxStorageCount; set => this._maxStorageCount = value; } + + /// Backing field for property. + private int? _maximumNodeCount; + + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MaximumNodeCount { get => this._maximumNodeCount; set => this._maximumNodeCount = value; } + + /// Backing field for property. + private int? _minCoreCountPerNode; + + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinCoreCountPerNode { get => this._minCoreCountPerNode; set => this._minCoreCountPerNode = value; } + + /// Backing field for property. + private int? _minDataStorageInTb; + + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinDataStorageInTb { get => this._minDataStorageInTb; set => this._minDataStorageInTb = value; } + + /// Backing field for property. + private int? _minDbNodeStoragePerNodeInGb; + + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinDbNodeStoragePerNodeInGb { get => this._minDbNodeStoragePerNodeInGb; set => this._minDbNodeStoragePerNodeInGb = value; } + + /// Backing field for property. + private int? _minMemoryPerNodeInGb; + + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinMemoryPerNodeInGb { get => this._minMemoryPerNodeInGb; set => this._minMemoryPerNodeInGb = value; } + + /// Backing field for property. + private int? _minStorageCount; + + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinStorageCount { get => this._minStorageCount; set => this._minStorageCount = value; } + + /// Backing field for property. + private int? _minimumCoreCount; + + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinimumCoreCount { get => this._minimumCoreCount; set => this._minimumCoreCount = value; } + + /// Backing field for property. + private int? _minimumNodeCount; + + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinimumNodeCount { get => this._minimumNodeCount; set => this._minimumNodeCount = value; } + + /// Backing field for property. + private int? _runtimeMinimumCoreCount; + + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RuntimeMinimumCoreCount { get => this._runtimeMinimumCoreCount; set => this._runtimeMinimumCoreCount = value; } + + /// Backing field for property. + private string _shapeFamily; + + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ShapeFamily { get => this._shapeFamily; set => this._shapeFamily = value; } + + /// Backing field for property. + private string _shapeName; + + /// The shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ShapeName { get => this._shapeName; set => this._shapeName = value; } + + /// Creates an new instance. + public DbSystemShapeProperties() + { + + } + } + /// DbSystemShape resource model + public partial interface IDbSystemShapeProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Indicates if the shape supports database and storage server types + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the shape supports database and storage server types", + SerializedName = @"areServerTypesSupported", + PossibleTypes = new [] { typeof(bool) })] + bool? AreServerTypesSupported { get; set; } + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The maximum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"availableCoreCount", + PossibleTypes = new [] { typeof(int) })] + int AvailableCoreCount { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"availableCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCountPerNode { get; set; } + /// The maximum DATA storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum DATA storage that can be enabled for this shape.", + SerializedName = @"availableDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDataStorageInTb { get; set; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDataStoragePerServerInTbs", + PossibleTypes = new [] { typeof(double) })] + double? AvailableDataStoragePerServerInTb { get; set; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableDbNodePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodePerNodeInGb { get; set; } + /// The maximum Db Node storage that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum Db Node storage that can be enabled for this shape.", + SerializedName = @"availableDbNodeStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbNodeStorageInGb { get; set; } + /// The maximum memory that can be enabled for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum memory that can be enabled for this shape.", + SerializedName = @"availableMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryInGb { get; set; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes.", + SerializedName = @"availableMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryPerNodeInGb { get; set; } + /// The compute model of the Exadata Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute model of the Exadata Infrastructure", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The discrete number by which the CPU core count for this shape can be increased or decreased.", + SerializedName = @"coreCountIncrement", + PossibleTypes = new [] { typeof(int) })] + int? CoreCountIncrement { get; set; } + /// The display name of the shape used for the DB system + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the shape used for the DB system", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"maxStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxStorageCount { get; set; } + /// The maximum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of database nodes available for this shape.", + SerializedName = @"maximumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MaximumNodeCount { get; set; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of CPU cores that can be enabled per node for this shape.", + SerializedName = @"minCoreCountPerNode", + PossibleTypes = new [] { typeof(int) })] + int? MinCoreCountPerNode { get; set; } + /// The minimum data storage that need be allocated for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum data storage that need be allocated for this shape.", + SerializedName = @"minDataStorageInTbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDataStorageInTb { get; set; } + /// The minimum Db Node storage that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum Db Node storage that need be allocated per node for this shape.", + SerializedName = @"minDbNodeStoragePerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinDbNodeStoragePerNodeInGb { get; set; } + /// The minimum memory that need be allocated per node for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum memory that need be allocated per node for this shape.", + SerializedName = @"minMemoryPerNodeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MinMemoryPerNodeInGb { get; set; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of Exadata storage servers available for the Exadata infrastructure.", + SerializedName = @"minStorageCount", + PossibleTypes = new [] { typeof(int) })] + int? MinStorageCount { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"minimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumCoreCount { get; set; } + /// The minimum number of database nodes available for this shape. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of database nodes available for this shape.", + SerializedName = @"minimumNodeCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumNodeCount { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The runtime minimum number of CPU cores that can be enabled on the DB system for this shape.", + SerializedName = @"runtimeMinimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? RuntimeMinimumCoreCount { get; set; } + /// The family of the shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The family of the shape used for the DB system.", + SerializedName = @"shapeFamily", + PossibleTypes = new [] { typeof(string) })] + string ShapeFamily { get; set; } + /// The shape used for the DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The shape used for the DB system.", + SerializedName = @"shapeName", + PossibleTypes = new [] { typeof(string) })] + string ShapeName { get; set; } + + } + /// DbSystemShape resource model + internal partial interface IDbSystemShapePropertiesInternal + + { + /// Indicates if the shape supports database and storage server types + bool? AreServerTypesSupported { get; set; } + /// + /// The maximum number of CPU cores that can be enabled on the DB system for this shape. + /// + int AvailableCoreCount { get; set; } + /// + /// 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. + /// + int? AvailableCoreCountPerNode { get; set; } + /// The maximum DATA storage that can be enabled for this shape. + int? AvailableDataStorageInTb { get; set; } + /// + /// The maximum data storage available per storage server for this shape. Only applicable to ExaCC Elastic shapes. + /// + double? AvailableDataStoragePerServerInTb { get; set; } + /// + /// The maximum Db Node storage available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableDbNodePerNodeInGb { get; set; } + /// The maximum Db Node storage that can be enabled for this shape. + int? AvailableDbNodeStorageInGb { get; set; } + /// The maximum memory that can be enabled for this shape. + int? AvailableMemoryInGb { get; set; } + /// + /// The maximum memory available per database node for this shape. Only applicable to ExaCC Elastic shapes. + /// + int? AvailableMemoryPerNodeInGb { get; set; } + /// The compute model of the Exadata Infrastructure + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel? ComputeModel { get; set; } + /// + /// The discrete number by which the CPU core count for this shape can be increased or decreased. + /// + int? CoreCountIncrement { get; set; } + /// The display name of the shape used for the DB system + string DisplayName { get; set; } + /// + /// The maximum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MaxStorageCount { get; set; } + /// The maximum number of database nodes available for this shape. + int? MaximumNodeCount { get; set; } + /// The minimum number of CPU cores that can be enabled per node for this shape. + int? MinCoreCountPerNode { get; set; } + /// The minimum data storage that need be allocated for this shape. + int? MinDataStorageInTb { get; set; } + /// The minimum Db Node storage that need be allocated per node for this shape. + int? MinDbNodeStoragePerNodeInGb { get; set; } + /// The minimum memory that need be allocated per node for this shape. + int? MinMemoryPerNodeInGb { get; set; } + /// + /// The minimum number of Exadata storage servers available for the Exadata infrastructure. + /// + int? MinStorageCount { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? MinimumCoreCount { get; set; } + /// The minimum number of database nodes available for this shape. + int? MinimumNodeCount { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled on the DB system for this shape. + /// + int? RuntimeMinimumCoreCount { get; set; } + /// The family of the shape used for the DB system. + string ShapeFamily { get; set; } + /// The shape used for the DB system. + string ShapeName { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.json.cs new file mode 100644 index 000000000000..e9ff721c82b0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DbSystemShapeProperties.json.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DbSystemShape resource model + public partial class DbSystemShapeProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbSystemShapeProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_shapeFamily = If( json?.PropertyT("shapeFamily"), out var __jsonShapeFamily) ? (string)__jsonShapeFamily : (string)ShapeFamily;} + {_shapeName = If( json?.PropertyT("shapeName"), out var __jsonShapeName) ? (string)__jsonShapeName : (string)ShapeName;} + {_availableCoreCount = If( json?.PropertyT("availableCoreCount"), out var __jsonAvailableCoreCount) ? (int)__jsonAvailableCoreCount : AvailableCoreCount;} + {_minimumCoreCount = If( json?.PropertyT("minimumCoreCount"), out var __jsonMinimumCoreCount) ? (int?)__jsonMinimumCoreCount : MinimumCoreCount;} + {_runtimeMinimumCoreCount = If( json?.PropertyT("runtimeMinimumCoreCount"), out var __jsonRuntimeMinimumCoreCount) ? (int?)__jsonRuntimeMinimumCoreCount : RuntimeMinimumCoreCount;} + {_coreCountIncrement = If( json?.PropertyT("coreCountIncrement"), out var __jsonCoreCountIncrement) ? (int?)__jsonCoreCountIncrement : CoreCountIncrement;} + {_minStorageCount = If( json?.PropertyT("minStorageCount"), out var __jsonMinStorageCount) ? (int?)__jsonMinStorageCount : MinStorageCount;} + {_maxStorageCount = If( json?.PropertyT("maxStorageCount"), out var __jsonMaxStorageCount) ? (int?)__jsonMaxStorageCount : MaxStorageCount;} + {_availableDataStoragePerServerInTb = If( json?.PropertyT("availableDataStoragePerServerInTbs"), out var __jsonAvailableDataStoragePerServerInTbs) ? (double?)__jsonAvailableDataStoragePerServerInTbs : AvailableDataStoragePerServerInTb;} + {_availableMemoryPerNodeInGb = If( json?.PropertyT("availableMemoryPerNodeInGbs"), out var __jsonAvailableMemoryPerNodeInGbs) ? (int?)__jsonAvailableMemoryPerNodeInGbs : AvailableMemoryPerNodeInGb;} + {_availableDbNodePerNodeInGb = If( json?.PropertyT("availableDbNodePerNodeInGbs"), out var __jsonAvailableDbNodePerNodeInGbs) ? (int?)__jsonAvailableDbNodePerNodeInGbs : AvailableDbNodePerNodeInGb;} + {_minCoreCountPerNode = If( json?.PropertyT("minCoreCountPerNode"), out var __jsonMinCoreCountPerNode) ? (int?)__jsonMinCoreCountPerNode : MinCoreCountPerNode;} + {_availableMemoryInGb = If( json?.PropertyT("availableMemoryInGbs"), out var __jsonAvailableMemoryInGbs) ? (int?)__jsonAvailableMemoryInGbs : AvailableMemoryInGb;} + {_minMemoryPerNodeInGb = If( json?.PropertyT("minMemoryPerNodeInGbs"), out var __jsonMinMemoryPerNodeInGbs) ? (int?)__jsonMinMemoryPerNodeInGbs : MinMemoryPerNodeInGb;} + {_availableDbNodeStorageInGb = If( json?.PropertyT("availableDbNodeStorageInGbs"), out var __jsonAvailableDbNodeStorageInGbs) ? (int?)__jsonAvailableDbNodeStorageInGbs : AvailableDbNodeStorageInGb;} + {_minDbNodeStoragePerNodeInGb = If( json?.PropertyT("minDbNodeStoragePerNodeInGbs"), out var __jsonMinDbNodeStoragePerNodeInGbs) ? (int?)__jsonMinDbNodeStoragePerNodeInGbs : MinDbNodeStoragePerNodeInGb;} + {_availableDataStorageInTb = If( json?.PropertyT("availableDataStorageInTbs"), out var __jsonAvailableDataStorageInTbs) ? (int?)__jsonAvailableDataStorageInTbs : AvailableDataStorageInTb;} + {_minDataStorageInTb = If( json?.PropertyT("minDataStorageInTbs"), out var __jsonMinDataStorageInTbs) ? (int?)__jsonMinDataStorageInTbs : MinDataStorageInTb;} + {_minimumNodeCount = If( json?.PropertyT("minimumNodeCount"), out var __jsonMinimumNodeCount) ? (int?)__jsonMinimumNodeCount : MinimumNodeCount;} + {_maximumNodeCount = If( json?.PropertyT("maximumNodeCount"), out var __jsonMaximumNodeCount) ? (int?)__jsonMaximumNodeCount : MaximumNodeCount;} + {_availableCoreCountPerNode = If( json?.PropertyT("availableCoreCountPerNode"), out var __jsonAvailableCoreCountPerNode) ? (int?)__jsonAvailableCoreCountPerNode : AvailableCoreCountPerNode;} + {_computeModel = If( json?.PropertyT("computeModel"), out var __jsonComputeModel) ? (string)__jsonComputeModel : (string)ComputeModel;} + {_areServerTypesSupported = If( json?.PropertyT("areServerTypesSupported"), out var __jsonAreServerTypesSupported) ? (bool?)__jsonAreServerTypesSupported : AreServerTypesSupported;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbSystemShapeProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._shapeFamily)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shapeFamily.ToString()) : null, "shapeFamily" ,container.Add ); + AddIf( null != (((object)this._shapeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shapeName.ToString()) : null, "shapeName" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._availableCoreCount), "availableCoreCount" ,container.Add ); + AddIf( null != this._minimumCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minimumCoreCount) : null, "minimumCoreCount" ,container.Add ); + AddIf( null != this._runtimeMinimumCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._runtimeMinimumCoreCount) : null, "runtimeMinimumCoreCount" ,container.Add ); + AddIf( null != this._coreCountIncrement ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._coreCountIncrement) : null, "coreCountIncrement" ,container.Add ); + AddIf( null != this._minStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minStorageCount) : null, "minStorageCount" ,container.Add ); + AddIf( null != this._maxStorageCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maxStorageCount) : null, "maxStorageCount" ,container.Add ); + AddIf( null != this._availableDataStoragePerServerInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((double)this._availableDataStoragePerServerInTb) : null, "availableDataStoragePerServerInTbs" ,container.Add ); + AddIf( null != this._availableMemoryPerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableMemoryPerNodeInGb) : null, "availableMemoryPerNodeInGbs" ,container.Add ); + AddIf( null != this._availableDbNodePerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableDbNodePerNodeInGb) : null, "availableDbNodePerNodeInGbs" ,container.Add ); + AddIf( null != this._minCoreCountPerNode ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minCoreCountPerNode) : null, "minCoreCountPerNode" ,container.Add ); + AddIf( null != this._availableMemoryInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableMemoryInGb) : null, "availableMemoryInGbs" ,container.Add ); + AddIf( null != this._minMemoryPerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minMemoryPerNodeInGb) : null, "minMemoryPerNodeInGbs" ,container.Add ); + AddIf( null != this._availableDbNodeStorageInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableDbNodeStorageInGb) : null, "availableDbNodeStorageInGbs" ,container.Add ); + AddIf( null != this._minDbNodeStoragePerNodeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minDbNodeStoragePerNodeInGb) : null, "minDbNodeStoragePerNodeInGbs" ,container.Add ); + AddIf( null != this._availableDataStorageInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableDataStorageInTb) : null, "availableDataStorageInTbs" ,container.Add ); + AddIf( null != this._minDataStorageInTb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minDataStorageInTb) : null, "minDataStorageInTbs" ,container.Add ); + AddIf( null != this._minimumNodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minimumNodeCount) : null, "minimumNodeCount" ,container.Add ); + AddIf( null != this._maximumNodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._maximumNodeCount) : null, "maximumNodeCount" ,container.Add ); + AddIf( null != this._availableCoreCountPerNode ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableCoreCountPerNode) : null, "availableCoreCountPerNode" ,container.Add ); + AddIf( null != (((object)this._computeModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._computeModel.ToString()) : null, "computeModel" ,container.Add ); + AddIf( null != this._areServerTypesSupported ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._areServerTypesSupported) : null, "areServerTypesSupported" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.PowerShell.cs new file mode 100644 index 000000000000..f23918180f3a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Predefined configurations for the file system + [System.ComponentModel.TypeConverter(typeof(DefinedFileSystemConfigurationTypeConverter))] + public partial class DefinedFileSystemConfiguration + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DefinedFileSystemConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsBackupPartition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsBackupPartition = (bool?) content.GetValueForProperty("IsBackupPartition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsBackupPartition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsResizable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsResizable = (bool?) content.GetValueForProperty("IsResizable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsResizable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MinSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MinSizeGb = (int?) content.GetValueForProperty("MinSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MinSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MountPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MountPoint = (string) content.GetValueForProperty("MountPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MountPoint, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DefinedFileSystemConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IsBackupPartition")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsBackupPartition = (bool?) content.GetValueForProperty("IsBackupPartition",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsBackupPartition, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsResizable")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsResizable = (bool?) content.GetValueForProperty("IsResizable",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).IsResizable, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MinSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MinSizeGb = (int?) content.GetValueForProperty("MinSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MinSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MountPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MountPoint = (string) content.GetValueForProperty("MountPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal)this).MountPoint, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DefinedFileSystemConfiguration(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DefinedFileSystemConfiguration(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Predefined configurations for the file system + [System.ComponentModel.TypeConverter(typeof(DefinedFileSystemConfigurationTypeConverter))] + public partial interface IDefinedFileSystemConfiguration + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..176408b93d5c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DefinedFileSystemConfigurationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DefinedFileSystemConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DefinedFileSystemConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DefinedFileSystemConfiguration.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.cs new file mode 100644 index 000000000000..ab4eb013cf67 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Predefined configurations for the file system + public partial class DefinedFileSystemConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfigurationInternal + { + + /// Backing field for property. + private bool? _isBackupPartition; + + /// Checks if the data can be backed up + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsBackupPartition { get => this._isBackupPartition; set => this._isBackupPartition = value; } + + /// Backing field for property. + private bool? _isResizable; + + /// Checks if the mount path is resizable + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsResizable { get => this._isResizable; set => this._isResizable = value; } + + /// Backing field for property. + private int? _minSizeGb; + + /// Minimum size of mount path in Gb + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinSizeGb { get => this._minSizeGb; set => this._minSizeGb = value; } + + /// Backing field for property. + private string _mountPoint; + + /// Mount path for the file system + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string MountPoint { get => this._mountPoint; set => this._mountPoint = value; } + + /// Creates an new instance. + public DefinedFileSystemConfiguration() + { + + } + } + /// Predefined configurations for the file system + public partial interface IDefinedFileSystemConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Checks if the data can be backed up + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Checks if the data can be backed up", + SerializedName = @"isBackupPartition", + PossibleTypes = new [] { typeof(bool) })] + bool? IsBackupPartition { get; set; } + /// Checks if the mount path is resizable + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Checks if the mount path is resizable", + SerializedName = @"isResizable", + PossibleTypes = new [] { typeof(bool) })] + bool? IsResizable { get; set; } + /// Minimum size of mount path in Gb + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Minimum size of mount path in Gb", + SerializedName = @"minSizeGb", + PossibleTypes = new [] { typeof(int) })] + int? MinSizeGb { get; set; } + /// Mount path for the file system + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Mount path for the file system", + SerializedName = @"mountPoint", + PossibleTypes = new [] { typeof(string) })] + string MountPoint { get; set; } + + } + /// Predefined configurations for the file system + internal partial interface IDefinedFileSystemConfigurationInternal + + { + /// Checks if the data can be backed up + bool? IsBackupPartition { get; set; } + /// Checks if the mount path is resizable + bool? IsResizable { get; set; } + /// Minimum size of mount path in Gb + int? MinSizeGb { get; set; } + /// Mount path for the file system + string MountPoint { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.json.cs new file mode 100644 index 000000000000..4ff03336b932 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DefinedFileSystemConfiguration.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Predefined configurations for the file system + public partial class DefinedFileSystemConfiguration + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DefinedFileSystemConfiguration(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_isBackupPartition = If( json?.PropertyT("isBackupPartition"), out var __jsonIsBackupPartition) ? (bool?)__jsonIsBackupPartition : IsBackupPartition;} + {_isResizable = If( json?.PropertyT("isResizable"), out var __jsonIsResizable) ? (bool?)__jsonIsResizable : IsResizable;} + {_minSizeGb = If( json?.PropertyT("minSizeGb"), out var __jsonMinSizeGb) ? (int?)__jsonMinSizeGb : MinSizeGb;} + {_mountPoint = If( json?.PropertyT("mountPoint"), out var __jsonMountPoint) ? (string)__jsonMountPoint : (string)MountPoint;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDefinedFileSystemConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DefinedFileSystemConfiguration(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._isBackupPartition ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isBackupPartition) : null, "isBackupPartition" ,container.Add ); + AddIf( null != this._isResizable ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isResizable) : null, "isResizable" ,container.Add ); + AddIf( null != this._minSizeGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minSizeGb) : null, "minSizeGb" ,container.Add ); + AddIf( null != (((object)this._mountPoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._mountPoint.ToString()) : null, "mountPoint" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.PowerShell.cs new file mode 100644 index 000000000000..bfb4ac5c8499 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Configurations of a Disaster Recovery Details + [System.ComponentModel.TypeConverter(typeof(DisasterRecoveryConfigurationDetailsTypeConverter))] + public partial class DisasterRecoveryConfigurationDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DisasterRecoveryConfigurationDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DisasterRecoveryConfigurationDetails(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DisasterRecoveryConfigurationDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).DisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("DisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).DisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).TimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("TimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).TimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsSnapshotStandby = (bool?) content.GetValueForProperty("IsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("IsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DisasterRecoveryConfigurationDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisasterRecoveryType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).DisasterRecoveryType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType?) content.GetValueForProperty("DisasterRecoveryType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).DisasterRecoveryType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType.CreateFrom); + } + if (content.Contains("TimeSnapshotStandbyEnabledTill")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).TimeSnapshotStandbyEnabledTill = (global::System.DateTime?) content.GetValueForProperty("TimeSnapshotStandbyEnabledTill",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).TimeSnapshotStandbyEnabledTill, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("IsSnapshotStandby")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsSnapshotStandby = (bool?) content.GetValueForProperty("IsSnapshotStandby",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsSnapshotStandby, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsReplicateAutomaticBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsReplicateAutomaticBackup = (bool?) content.GetValueForProperty("IsReplicateAutomaticBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal)this).IsReplicateAutomaticBackup, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Configurations of a Disaster Recovery Details + [System.ComponentModel.TypeConverter(typeof(DisasterRecoveryConfigurationDetailsTypeConverter))] + public partial interface IDisasterRecoveryConfigurationDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.TypeConverter.cs new file mode 100644 index 000000000000..6a70d12f94d9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DisasterRecoveryConfigurationDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DisasterRecoveryConfigurationDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DisasterRecoveryConfigurationDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DisasterRecoveryConfigurationDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.cs new file mode 100644 index 000000000000..d7b98b7c21fe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Configurations of a Disaster Recovery Details + public partial class DisasterRecoveryConfigurationDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetailsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? _disasterRecoveryType; + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? DisasterRecoveryType { get => this._disasterRecoveryType; set => this._disasterRecoveryType = value; } + + /// Backing field for property. + private bool? _isReplicateAutomaticBackup; + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsReplicateAutomaticBackup { get => this._isReplicateAutomaticBackup; set => this._isReplicateAutomaticBackup = value; } + + /// Backing field for property. + private bool? _isSnapshotStandby; + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsSnapshotStandby { get => this._isSnapshotStandby; set => this._isSnapshotStandby = value; } + + /// Backing field for property. + private global::System.DateTime? _timeSnapshotStandbyEnabledTill; + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeSnapshotStandbyEnabledTill { get => this._timeSnapshotStandbyEnabledTill; set => this._timeSnapshotStandbyEnabledTill = value; } + + /// Creates an new instance. + public DisasterRecoveryConfigurationDetails() + { + + } + } + /// Configurations of a Disaster Recovery Details + public partial interface IDisasterRecoveryConfigurationDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"disasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? DisasterRecoveryType { get; set; } + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + SerializedName = @"isReplicateAutomaticBackups", + PossibleTypes = new [] { typeof(bool) })] + bool? IsReplicateAutomaticBackup { get; set; } + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.", + SerializedName = @"isSnapshotStandby", + PossibleTypes = new [] { typeof(bool) })] + bool? IsSnapshotStandby { get; set; } + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.", + SerializedName = @"timeSnapshotStandbyEnabledTill", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeSnapshotStandbyEnabledTill { get; set; } + + } + /// Configurations of a Disaster Recovery Details + internal partial interface IDisasterRecoveryConfigurationDetailsInternal + + { + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType? DisasterRecoveryType { get; set; } + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + bool? IsReplicateAutomaticBackup { get; set; } + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + bool? IsSnapshotStandby { get; set; } + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + global::System.DateTime? TimeSnapshotStandbyEnabledTill { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.json.cs new file mode 100644 index 000000000000..5c0dab81bf28 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DisasterRecoveryConfigurationDetails.json.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Configurations of a Disaster Recovery Details + public partial class DisasterRecoveryConfigurationDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DisasterRecoveryConfigurationDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_disasterRecoveryType = If( json?.PropertyT("disasterRecoveryType"), out var __jsonDisasterRecoveryType) ? (string)__jsonDisasterRecoveryType : (string)DisasterRecoveryType;} + {_timeSnapshotStandbyEnabledTill = If( json?.PropertyT("timeSnapshotStandbyEnabledTill"), out var __jsonTimeSnapshotStandbyEnabledTill) ? global::System.DateTime.TryParse((string)__jsonTimeSnapshotStandbyEnabledTill, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeSnapshotStandbyEnabledTillValue) ? __jsonTimeSnapshotStandbyEnabledTillValue : TimeSnapshotStandbyEnabledTill : TimeSnapshotStandbyEnabledTill;} + {_isSnapshotStandby = If( json?.PropertyT("isSnapshotStandby"), out var __jsonIsSnapshotStandby) ? (bool?)__jsonIsSnapshotStandby : IsSnapshotStandby;} + {_isReplicateAutomaticBackup = If( json?.PropertyT("isReplicateAutomaticBackups"), out var __jsonIsReplicateAutomaticBackups) ? (bool?)__jsonIsReplicateAutomaticBackups : IsReplicateAutomaticBackup;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DisasterRecoveryConfigurationDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._disasterRecoveryType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._disasterRecoveryType.ToString()) : null, "disasterRecoveryType" ,container.Add ); + AddIf( null != this._timeSnapshotStandbyEnabledTill ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeSnapshotStandbyEnabledTill?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeSnapshotStandbyEnabledTill" ,container.Add ); + AddIf( null != this._isSnapshotStandby ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isSnapshotStandby) : null, "isSnapshotStandby" ,container.Add ); + AddIf( null != this._isReplicateAutomaticBackup ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isReplicateAutomaticBackup) : null, "isReplicateAutomaticBackups" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.PowerShell.cs new file mode 100644 index 000000000000..eac37d4e2016 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.PowerShell.cs @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DnsPrivateView resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewTypeConverter))] + public partial class DnsPrivateView + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateView(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateView(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateView(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeUpdated = (global::System.DateTime) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateView(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeUpdated = (global::System.DateTime) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DnsPrivateView resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewTypeConverter))] + public partial interface IDnsPrivateView + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.TypeConverter.cs new file mode 100644 index 000000000000..556142bda8aa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateViewTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateView.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateView.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateView.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.cs new file mode 100644 index 000000000000..829edce0f82d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.cs @@ -0,0 +1,244 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DnsPrivateView resource definition + public partial class DnsPrivateView : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).DisplayName = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).IsProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).IsProtected = value ?? default(bool); } + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).LifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState)""); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).Ocid = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).ProvisioningState; } + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Self { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).Self; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).Self = value ?? null; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).TimeCreated = value ?? default(global::System.DateTime); } + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeUpdated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).TimeUpdated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)Property).TimeUpdated = value ?? default(global::System.DateTime); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public DnsPrivateView() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// DnsPrivateView resource definition + public partial interface IDnsPrivateView : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The display name of the view resource", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool? IsProtected { get; set; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState? LifecycleState { get; set; } + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the view", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; set; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"views timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; set; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"views timeCreated", + SerializedName = @"timeUpdated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeUpdated { get; set; } + + } + /// DnsPrivateView resource definition + internal partial interface IDnsPrivateViewInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The display name of the view resource + string DisplayName { get; set; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool? IsProtected { get; set; } + /// Views lifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState? LifecycleState { get; set; } + /// The OCID of the view + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties Property { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// views timeCreated + global::System.DateTime? TimeCreated { get; set; } + /// views timeCreated + global::System.DateTime? TimeUpdated { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.json.cs new file mode 100644 index 000000000000..534e17fa0242 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateView.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DnsPrivateView resource definition + public partial class DnsPrivateView + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateView(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DnsPrivateView(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.PowerShell.cs new file mode 100644 index 000000000000..1a50788c6e73 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a DnsPrivateView list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewListResultTypeConverter))] + public partial class DnsPrivateViewListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateViewListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateViewListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateViewListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateViewListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a DnsPrivateView list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewListResultTypeConverter))] + public partial interface IDnsPrivateViewListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.TypeConverter.cs new file mode 100644 index 000000000000..f4da0ee5364f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateViewListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateViewListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateViewListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateViewListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.cs new file mode 100644 index 000000000000..5d5b0bfc2c51 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DnsPrivateView list operation. + public partial class DnsPrivateViewListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView[] _value; + + /// The DnsPrivateView items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DnsPrivateViewListResult() + { + + } + } + /// The response of a DnsPrivateView list operation. + public partial interface IDnsPrivateViewListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DnsPrivateView items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DnsPrivateView items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView[] Value { get; set; } + + } + /// The response of a DnsPrivateView list operation. + internal partial interface IDnsPrivateViewListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DnsPrivateView items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.json.cs new file mode 100644 index 000000000000..f321351c6105 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DnsPrivateView list operation. + public partial class DnsPrivateViewListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateViewListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateView.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DnsPrivateViewListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.PowerShell.cs new file mode 100644 index 000000000000..37717cb5ec82 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Views resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewPropertiesTypeConverter))] + public partial class DnsPrivateViewProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateViewProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateViewProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateViewProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeUpdated = (global::System.DateTime) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateViewProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeUpdated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeUpdated = (global::System.DateTime) content.GetValueForProperty("TimeUpdated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).TimeUpdated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Views resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateViewPropertiesTypeConverter))] + public partial interface IDnsPrivateViewProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.TypeConverter.cs new file mode 100644 index 000000000000..d5c253e50625 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateViewPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateViewProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateViewProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateViewProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.cs new file mode 100644 index 000000000000..d976aef6079e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Views resource model + public partial class DnsPrivateViewProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal + { + + /// Backing field for property. + private string _displayName; + + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private bool _isProtected; + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool IsProtected { get => this._isProtected; set => this._isProtected = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState _lifecycleState; + + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _ocid; + + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _self; + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Self { get => this._self; set => this._self = value; } + + /// Backing field for property. + private global::System.DateTime _timeCreated; + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime TimeCreated { get => this._timeCreated; set => this._timeCreated = value; } + + /// Backing field for property. + private global::System.DateTime _timeUpdated; + + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime TimeUpdated { get => this._timeUpdated; set => this._timeUpdated = value; } + + /// Creates an new instance. + public DnsPrivateViewProperties() + { + + } + } + /// Views resource model + public partial interface IDnsPrivateViewProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The display name of the view resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The display name of the view resource", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool IsProtected { get; set; } + /// Views lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Views lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState LifecycleState { get; set; } + /// The OCID of the view + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The OCID of the view", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; set; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"views timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime TimeCreated { get; set; } + /// views timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"views timeCreated", + SerializedName = @"timeUpdated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime TimeUpdated { get; set; } + + } + /// Views resource model + internal partial interface IDnsPrivateViewPropertiesInternal + + { + /// The display name of the view resource + string DisplayName { get; set; } + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool IsProtected { get; set; } + /// Views lifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState LifecycleState { get; set; } + /// The OCID of the view + string Ocid { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// views timeCreated + global::System.DateTime TimeCreated { get; set; } + /// views timeCreated + global::System.DateTime TimeUpdated { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.json.cs new file mode 100644 index 000000000000..80f29d0bf4db --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateViewProperties.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Views resource model + public partial class DnsPrivateViewProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateViewProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_isProtected = If( json?.PropertyT("isProtected"), out var __jsonIsProtected) ? (bool)__jsonIsProtected : IsProtected;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_self = If( json?.PropertyT("self"), out var __jsonSelf) ? (string)__jsonSelf : (string)Self;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : TimeCreated : TimeCreated;} + {_timeUpdated = If( json?.PropertyT("timeUpdated"), out var __jsonTimeUpdated) ? global::System.DateTime.TryParse((string)__jsonTimeUpdated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeUpdatedValue) ? __jsonTimeUpdatedValue : TimeUpdated : TimeUpdated;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DnsPrivateViewProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean(this._isProtected), "isProtected" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._self)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._self.ToString()) : null, "self" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "timeCreated" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeUpdated.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "timeUpdated" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.PowerShell.cs new file mode 100644 index 000000000000..b7cc4018e639 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.PowerShell.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// DnsPrivateZone resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneTypeConverter))] + public partial class DnsPrivateZone + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateZone(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateZone(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateZone(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZonePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ZoneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ZoneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType.CreateFrom); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Serial = (int) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateZone(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZonePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ZoneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ZoneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType.CreateFrom); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Serial = (int) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// DnsPrivateZone resource definition + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneTypeConverter))] + public partial interface IDnsPrivateZone + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.TypeConverter.cs new file mode 100644 index 000000000000..40d39406380d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateZoneTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateZone.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateZone.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateZone.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.cs new file mode 100644 index 000000000000..e93678867fb4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.cs @@ -0,0 +1,296 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DnsPrivateZone resource definition + public partial class DnsPrivateZone : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? IsProtected { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).IsProtected; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).IsProtected = value ?? default(bool); } + + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).LifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState)""); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Ocid = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).ProvisioningState; } + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Self { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Self; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Self = value ?? null; } + + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? Serial { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Serial; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Serial = value ?? default(int); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeCreated { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).TimeCreated; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).TimeCreated = value ?? default(global::System.DateTime); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).Version = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ViewId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).ViewId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).ViewId = value ?? null; } + + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType? ZoneType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).ZoneType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)Property).ZoneType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType)""); } + + /// Creates an new instance. + public DnsPrivateZone() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// DnsPrivateZone resource definition + public partial interface IDnsPrivateZone : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool? IsProtected { get; set; } + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Zones lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState? LifecycleState { get; set; } + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the Zone", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; set; } + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current serial of the zone. As seen in the zone's SOA record.", + SerializedName = @"serial", + PossibleTypes = new [] { typeof(int) })] + int? Serial { get; set; } + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Zones timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; set; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"viewId", + PossibleTypes = new [] { typeof(string) })] + string ViewId { get; set; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones.", + SerializedName = @"zoneType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType? ZoneType { get; set; } + + } + /// DnsPrivateZone resource definition + internal partial interface IDnsPrivateZoneInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool? IsProtected { get; set; } + /// Zones lifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState? LifecycleState { get; set; } + /// The OCID of the Zone + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties Property { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// The current serial of the zone. As seen in the zone's SOA record. + int? Serial { get; set; } + /// Zones timeCreated + global::System.DateTime? TimeCreated { get; set; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + string Version { get; set; } + /// + /// 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. + /// + string ViewId { get; set; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType? ZoneType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.json.cs new file mode 100644 index 000000000000..e260f59ce533 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZone.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// DnsPrivateZone resource definition + public partial class DnsPrivateZone + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateZone(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DnsPrivateZone(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.PowerShell.cs new file mode 100644 index 000000000000..2de3597be71b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a DnsPrivateZone list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneListResultTypeConverter))] + public partial class DnsPrivateZoneListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateZoneListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateZoneListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateZoneListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateZoneListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a DnsPrivateZone list operation. + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZoneListResultTypeConverter))] + public partial interface IDnsPrivateZoneListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.TypeConverter.cs new file mode 100644 index 000000000000..2793d3eeb22f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateZoneListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateZoneListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateZoneListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateZoneListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.cs new file mode 100644 index 000000000000..91db5665a4fb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DnsPrivateZone list operation. + public partial class DnsPrivateZoneListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone[] _value; + + /// The DnsPrivateZone items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public DnsPrivateZoneListResult() + { + + } + } + /// The response of a DnsPrivateZone list operation. + public partial interface IDnsPrivateZoneListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The DnsPrivateZone items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The DnsPrivateZone items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone[] Value { get; set; } + + } + /// The response of a DnsPrivateZone list operation. + internal partial interface IDnsPrivateZoneListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The DnsPrivateZone items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.json.cs new file mode 100644 index 000000000000..43c050dbdcb3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a DnsPrivateZone list operation. + public partial class DnsPrivateZoneListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateZoneListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZone.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DnsPrivateZoneListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.PowerShell.cs new file mode 100644 index 000000000000..3bd2c8404002 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Zones resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZonePropertiesTypeConverter))] + public partial class DnsPrivateZoneProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DnsPrivateZoneProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DnsPrivateZoneProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DnsPrivateZoneProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Serial = (int) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ZoneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ZoneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType.CreateFrom); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DnsPrivateZoneProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IsProtected")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).IsProtected = (bool) content.GetValueForProperty("IsProtected",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).IsProtected, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState.CreateFrom); + } + if (content.Contains("Self")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Self = (string) content.GetValueForProperty("Self",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Self, global::System.Convert.ToString); + } + if (content.Contains("Serial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Serial = (int) content.GetValueForProperty("Serial",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Serial, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("ViewId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ViewId = (string) content.GetValueForProperty("ViewId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ViewId, global::System.Convert.ToString); + } + if (content.Contains("ZoneType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ZoneType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType) content.GetValueForProperty("ZoneType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ZoneType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType.CreateFrom); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).TimeCreated = (global::System.DateTime) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Zones resource model + [System.ComponentModel.TypeConverter(typeof(DnsPrivateZonePropertiesTypeConverter))] + public partial interface IDnsPrivateZoneProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.TypeConverter.cs new file mode 100644 index 000000000000..89c25e8378b4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DnsPrivateZonePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DnsPrivateZoneProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DnsPrivateZoneProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DnsPrivateZoneProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.cs new file mode 100644 index 000000000000..954a90fab869 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.cs @@ -0,0 +1,237 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Zones resource model + public partial class DnsPrivateZoneProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal + { + + /// Backing field for property. + private bool _isProtected; + + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool IsProtected { get => this._isProtected; set => this._isProtected = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState _lifecycleState; + + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZonePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _ocid; + + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _self; + + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Self { get => this._self; set => this._self = value; } + + /// Backing field for property. + private int _serial; + + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int Serial { get => this._serial; set => this._serial = value; } + + /// Backing field for property. + private global::System.DateTime _timeCreated; + + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime TimeCreated { get => this._timeCreated; set => this._timeCreated = value; } + + /// Backing field for property. + private string _version; + + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Backing field for property. + private string _viewId; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ViewId { get => this._viewId; set => this._viewId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType _zoneType; + + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType ZoneType { get => this._zoneType; set => this._zoneType = value; } + + /// Creates an new instance. + public DnsPrivateZoneProperties() + { + + } + } + /// Zones resource model + public partial interface IDnsPrivateZoneProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed.", + SerializedName = @"isProtected", + PossibleTypes = new [] { typeof(bool) })] + bool IsProtected { get; set; } + /// Zones lifecycleState + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Zones lifecycleState", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState LifecycleState { get; set; } + /// The OCID of the Zone + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The OCID of the Zone", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; } + /// The canonical absolute URL of the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The canonical absolute URL of the resource.", + SerializedName = @"self", + PossibleTypes = new [] { typeof(string) })] + string Self { get; set; } + /// The current serial of the zone. As seen in the zone's SOA record. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The current serial of the zone. As seen in the zone's SOA record.", + SerializedName = @"serial", + PossibleTypes = new [] { typeof(int) })] + int Serial { get; set; } + /// Zones timeCreated + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Zones timeCreated", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime TimeCreated { get; set; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA record is derived.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"viewId", + PossibleTypes = new [] { typeof(string) })] + string ViewId { get; set; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones.", + SerializedName = @"zoneType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType ZoneType { get; set; } + + } + /// Zones resource model + internal partial interface IDnsPrivateZonePropertiesInternal + + { + /// + /// A Boolean flag indicating whether or not parts of the resource are unable to be explicitly managed. + /// + bool IsProtected { get; set; } + /// Zones lifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState LifecycleState { get; set; } + /// The OCID of the Zone + string Ocid { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState? ProvisioningState { get; set; } + /// The canonical absolute URL of the resource. + string Self { get; set; } + /// The current serial of the zone. As seen in the zone's SOA record. + int Serial { get; set; } + /// Zones timeCreated + global::System.DateTime TimeCreated { get; set; } + /// + /// Version is the never-repeating, totally-orderable, version of the zone, from which the serial field of the zone's SOA + /// record is derived. + /// + string Version { get; set; } + /// + /// 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. + /// + string ViewId { get; set; } + /// + /// The type of the zone. Must be either PRIMARY or SECONDARY. SECONDARY is only supported for GLOBAL zones. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType ZoneType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.json.cs new file mode 100644 index 000000000000..3f8db6923bac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/DnsPrivateZoneProperties.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Zones resource model + public partial class DnsPrivateZoneProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DnsPrivateZoneProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_isProtected = If( json?.PropertyT("isProtected"), out var __jsonIsProtected) ? (bool)__jsonIsProtected : IsProtected;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_self = If( json?.PropertyT("self"), out var __jsonSelf) ? (string)__jsonSelf : (string)Self;} + {_serial = If( json?.PropertyT("serial"), out var __jsonSerial) ? (int)__jsonSerial : Serial;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + {_viewId = If( json?.PropertyT("viewId"), out var __jsonViewId) ? (string)__jsonViewId : (string)ViewId;} + {_zoneType = If( json?.PropertyT("zoneType"), out var __jsonZoneType) ? (string)__jsonZoneType : (string)ZoneType;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : TimeCreated : TimeCreated;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DnsPrivateZoneProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean(this._isProtected), "isProtected" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._self)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._self.ToString()) : null, "self" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._serial), "serial" ,container.Add ); + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AddIf( null != (((object)this._viewId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._viewId.ToString()) : null, "viewId" ,container.Add ); + AddIf( null != (((object)this._zoneType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._zoneType.ToString()) : null, "zoneType" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "timeCreated" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.PowerShell.cs new file mode 100644 index 000000000000..a6a6154dc917 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.PowerShell.cs @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + [System.ComponentModel.TypeConverter(typeof(EstimatedPatchingTimeTypeConverter))] + public partial class EstimatedPatchingTime + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EstimatedPatchingTime(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EstimatedPatchingTime(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EstimatedPatchingTime(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime = (int?) content.GetValueForProperty("TotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EstimatedPatchingTime(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("EstimatedDbServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime = (int?) content.GetValueForProperty("EstimatedDbServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedDbServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedNetworkSwitchesPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime = (int?) content.GetValueForProperty("EstimatedNetworkSwitchesPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedNetworkSwitchesPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EstimatedStorageServerPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime = (int?) content.GetValueForProperty("EstimatedStorageServerPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).EstimatedStorageServerPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalEstimatedPatchingTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime = (int?) content.GetValueForProperty("TotalEstimatedPatchingTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal)this).TotalEstimatedPatchingTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + [System.ComponentModel.TypeConverter(typeof(EstimatedPatchingTimeTypeConverter))] + public partial interface IEstimatedPatchingTime + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.TypeConverter.cs new file mode 100644 index 000000000000..1b4d86da254e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EstimatedPatchingTimeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EstimatedPatchingTime.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EstimatedPatchingTime.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EstimatedPatchingTime.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.cs new file mode 100644 index 000000000000..529593abf0e6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + public partial class EstimatedPatchingTime : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal + { + + /// Backing field for property. + private int? _estimatedDbServerPatchingTime; + + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? EstimatedDbServerPatchingTime { get => this._estimatedDbServerPatchingTime; } + + /// Backing field for property. + private int? _estimatedNetworkSwitchesPatchingTime; + + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? EstimatedNetworkSwitchesPatchingTime { get => this._estimatedNetworkSwitchesPatchingTime; } + + /// Backing field for property. + private int? _estimatedStorageServerPatchingTime; + + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? EstimatedStorageServerPatchingTime { get => this._estimatedStorageServerPatchingTime; } + + /// Internal Acessors for EstimatedDbServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal.EstimatedDbServerPatchingTime { get => this._estimatedDbServerPatchingTime; set { {_estimatedDbServerPatchingTime = value;} } } + + /// Internal Acessors for EstimatedNetworkSwitchesPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal.EstimatedNetworkSwitchesPatchingTime { get => this._estimatedNetworkSwitchesPatchingTime; set { {_estimatedNetworkSwitchesPatchingTime = value;} } } + + /// Internal Acessors for EstimatedStorageServerPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal.EstimatedStorageServerPatchingTime { get => this._estimatedStorageServerPatchingTime; set { {_estimatedStorageServerPatchingTime = value;} } } + + /// Internal Acessors for TotalEstimatedPatchingTime + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTimeInternal.TotalEstimatedPatchingTime { get => this._totalEstimatedPatchingTime; set { {_totalEstimatedPatchingTime = value;} } } + + /// Backing field for property. + private int? _totalEstimatedPatchingTime; + + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? TotalEstimatedPatchingTime { get => this._totalEstimatedPatchingTime; } + + /// Creates an new instance. + public EstimatedPatchingTime() + { + + } + } + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + public partial interface IEstimatedPatchingTime : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The estimated time required in minutes for database server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for database server patching.", + SerializedName = @"estimatedDbServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedDbServerPatchingTime { get; } + /// The estimated time required in minutes for network switch patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for network switch patching.", + SerializedName = @"estimatedNetworkSwitchesPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedNetworkSwitchesPatchingTime { get; } + /// The estimated time required in minutes for storage server patching. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated time required in minutes for storage server patching.", + SerializedName = @"estimatedStorageServerPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? EstimatedStorageServerPatchingTime { get; } + /// The estimated total time required in minutes for all patching operations. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The estimated total time required in minutes for all patching operations.", + SerializedName = @"totalEstimatedPatchingTime", + PossibleTypes = new [] { typeof(int) })] + int? TotalEstimatedPatchingTime { get; } + + } + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + internal partial interface IEstimatedPatchingTimeInternal + + { + /// The estimated time required in minutes for database server patching. + int? EstimatedDbServerPatchingTime { get; set; } + /// The estimated time required in minutes for network switch patching. + int? EstimatedNetworkSwitchesPatchingTime { get; set; } + /// The estimated time required in minutes for storage server patching. + int? EstimatedStorageServerPatchingTime { get; set; } + /// The estimated total time required in minutes for all patching operations. + int? TotalEstimatedPatchingTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.json.cs new file mode 100644 index 000000000000..2c83fb868f95 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/EstimatedPatchingTime.json.cs @@ -0,0 +1,129 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The estimated total time required in minutes for all patching operations (database server, storage server, and network + /// switch patching). + /// + public partial class EstimatedPatchingTime + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal EstimatedPatchingTime(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_estimatedDbServerPatchingTime = If( json?.PropertyT("estimatedDbServerPatchingTime"), out var __jsonEstimatedDbServerPatchingTime) ? (int?)__jsonEstimatedDbServerPatchingTime : EstimatedDbServerPatchingTime;} + {_estimatedNetworkSwitchesPatchingTime = If( json?.PropertyT("estimatedNetworkSwitchesPatchingTime"), out var __jsonEstimatedNetworkSwitchesPatchingTime) ? (int?)__jsonEstimatedNetworkSwitchesPatchingTime : EstimatedNetworkSwitchesPatchingTime;} + {_estimatedStorageServerPatchingTime = If( json?.PropertyT("estimatedStorageServerPatchingTime"), out var __jsonEstimatedStorageServerPatchingTime) ? (int?)__jsonEstimatedStorageServerPatchingTime : EstimatedStorageServerPatchingTime;} + {_totalEstimatedPatchingTime = If( json?.PropertyT("totalEstimatedPatchingTime"), out var __jsonTotalEstimatedPatchingTime) ? (int?)__jsonTotalEstimatedPatchingTime : TotalEstimatedPatchingTime;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IEstimatedPatchingTime FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new EstimatedPatchingTime(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._estimatedDbServerPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._estimatedDbServerPatchingTime) : null, "estimatedDbServerPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._estimatedNetworkSwitchesPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._estimatedNetworkSwitchesPatchingTime) : null, "estimatedNetworkSwitchesPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._estimatedStorageServerPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._estimatedStorageServerPatchingTime) : null, "estimatedStorageServerPatchingTime" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._totalEstimatedPatchingTime ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._totalEstimatedPatchingTime) : null, "totalEstimatedPatchingTime" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.PowerShell.cs new file mode 100644 index 000000000000..e66b7baa4e2c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// ExadataIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(ExadataIormConfigTypeConverter))] + public partial class ExadataIormConfig + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadataIormConfig(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadataIormConfig(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadataIormConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).DbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("DbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).DbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + if (content.Contains("Objective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).Objective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("Objective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).Objective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadataIormConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).DbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("DbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).DbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + if (content.Contains("Objective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).Objective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("Objective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)this).Objective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// ExadataIormConfig for cloud vm cluster + [System.ComponentModel.TypeConverter(typeof(ExadataIormConfigTypeConverter))] + public partial interface IExadataIormConfig + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.TypeConverter.cs new file mode 100644 index 000000000000..6e50ff19ba62 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadataIormConfigTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadataIormConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadataIormConfig.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadataIormConfig.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.cs new file mode 100644 index 000000000000..acd9873ac184 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExadataIormConfig for cloud vm cluster + public partial class ExadataIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] _dbPlan; + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] DbPlan { get => this._dbPlan; set => this._dbPlan = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; set => this._lifecycleDetail = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? _lifecycleState; + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? _objective; + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? Objective { get => this._objective; set => this._objective = value; } + + /// Creates an new instance. + public ExadataIormConfig() + { + + } + } + /// ExadataIormConfig for cloud vm cluster + public partial interface IExadataIormConfig : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] DbPlan { get; set; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? LifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? Objective { get; set; } + + } + /// ExadataIormConfig for cloud vm cluster + internal partial interface IExadataIormConfigInternal + + { + /// An array of IORM settings for all the database in the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] DbPlan { get; set; } + /// Additional information about the current lifecycleState. + string LifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? LifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? Objective { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.json.cs new file mode 100644 index 000000000000..379cda8a467d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadataIormConfig.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExadataIormConfig for cloud vm cluster + public partial class ExadataIormConfig + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadataIormConfig(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbPlan = If( json?.PropertyT("dbPlans"), out var __jsonDbPlans) ? If( __jsonDbPlans as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfig.FromJson(__u) )) ))() : null : DbPlan;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_objective = If( json?.PropertyT("objective"), out var __jsonObjective) ? (string)__jsonObjective : (string)Objective;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadataIormConfig(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._dbPlan) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._dbPlan ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("dbPlans",__w); + } + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._objective)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._objective.ToString()) : null, "objective" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.PowerShell.cs new file mode 100644 index 000000000000..8e31f3ea4f53 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.PowerShell.cs @@ -0,0 +1,690 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// ExadbVmCluster resource definition + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterTypeConverter))] + public partial class ExadbVMCluster + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMCluster(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMCluster(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMCluster(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("VMFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("VMFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("SnapshotFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("TotalFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("TotalFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("EnabledEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).EnabledEcpuCount = (int) content.GetValueForProperty("EnabledEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).EnabledEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExascaleDbStorageVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ExascaleDbStorageVaultId = (string) content.GetValueForProperty("ExascaleDbStorageVaultId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ExascaleDbStorageVaultId, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageOcid, global::System.Convert.ToString); + } + if (content.Contains("GridImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType?) content.GetValueForProperty("GridImageType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType.CreateFrom); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NodeCount = (int) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("ZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ZoneOcid = (string) content.GetValueForProperty("ZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("PrivateZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).PrivateZoneOcid = (string) content.GetValueForProperty("PrivateZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).PrivateZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ListenerPort = (int?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ListenerPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("TotalEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalEcpuCount = (int) content.GetValueForProperty("TotalEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetOcid = (string) content.GetValueForProperty("BackupSubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VMFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("VMFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SnapshotFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("SnapshotFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("TotalFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMCluster(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("VMFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("VMFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("SnapshotFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("TotalFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("TotalFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("EnabledEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).EnabledEcpuCount = (int) content.GetValueForProperty("EnabledEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).EnabledEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExascaleDbStorageVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ExascaleDbStorageVaultId = (string) content.GetValueForProperty("ExascaleDbStorageVaultId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ExascaleDbStorageVaultId, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageOcid, global::System.Convert.ToString); + } + if (content.Contains("GridImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType?) content.GetValueForProperty("GridImageType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GridImageType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType.CreateFrom); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NodeCount = (int) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("ZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ZoneOcid = (string) content.GetValueForProperty("ZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("PrivateZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).PrivateZoneOcid = (string) content.GetValueForProperty("PrivateZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).PrivateZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ListenerPort = (int?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ListenerPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("TotalEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalEcpuCount = (int) content.GetValueForProperty("TotalEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetOcid = (string) content.GetValueForProperty("BackupSubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).BackupSubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VMFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("VMFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).VMFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SnapshotFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("SnapshotFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).SnapshotFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("TotalFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).TotalFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// ExadbVmCluster resource definition + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterTypeConverter))] + public partial interface IExadbVMCluster + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.TypeConverter.cs new file mode 100644 index 000000000000..67de50848f4a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClusterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMCluster.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMCluster.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMCluster.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.cs new file mode 100644 index 000000000000..dfd28e20c1fa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.cs @@ -0,0 +1,1077 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExadbVmCluster resource definition + public partial class ExadbVMCluster : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(); + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string BackupSubnetCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).BackupSubnetCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).BackupSubnetCidr = value ?? null; } + + /// Cluster backup subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string BackupSubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).BackupSubnetOcid; } + + /// + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, + /// and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and + /// is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ClusterName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ClusterName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ClusterName = value ?? null; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOptionIsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOptionIsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOptionIsIncidentLogsEnabled = value ?? default(bool); } + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DisplayName = value ?? null; } + + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Domain { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Domain; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Domain = value ?? null; } + + /// + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? EnabledEcpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).EnabledEcpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).EnabledEcpuCount = value ?? default(int); } + + /// The Azure Resource ID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ExascaleDbStorageVaultId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ExascaleDbStorageVaultId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ExascaleDbStorageVaultId = value ?? null; } + + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string GiVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GiVersion; } + + /// + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string GridImageOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GridImageOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GridImageOcid = value ?? null; } + + /// The type of Grid Image + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? GridImageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GridImageType; } + + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Hostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Hostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Hostname = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; } + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheDbPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheDbPlan = value ?? null /* arrayOf */; } + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleDetail = value ?? null; } + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheLifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState)""); } + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheObjective; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCacheObjective = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective)""); } + + /// + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LicenseModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LicenseModel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LifecycleDetail; } + + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LifecycleState; } + + /// + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ListenerPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ListenerPort; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).MemorySizeInGb; } + + /// Internal Acessors for BackupSubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.BackupSubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).BackupSubnetOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).BackupSubnetOcid = value; } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.DataCollectionOption { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOption; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).DataCollectionOption = value; } + + /// Internal Acessors for GiVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.GiVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GiVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GiVersion = value; } + + /// Internal Acessors for GridImageType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.GridImageType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GridImageType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).GridImageType = value; } + + /// Internal Acessors for IormConfigCache + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.IormConfigCache { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCache; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).IormConfigCache = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for ListenerPort + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.ListenerPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ListenerPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ListenerPort = value; } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).MemorySizeInGb = value; } + + /// Internal Acessors for NsgUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.NsgUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).NsgUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).NsgUrl = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for ScanDnsName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.ScanDnsName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanDnsName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanDnsName = value; } + + /// Internal Acessors for ScanDnsRecordId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.ScanDnsRecordId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanDnsRecordId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanDnsRecordId = value; } + + /// Internal Acessors for ScanIPId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.ScanIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanIPId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanIPId = value; } + + /// Internal Acessors for SnapshotFileSystemStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.SnapshotFileSystemStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SnapshotFileSystemStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SnapshotFileSystemStorage = value; } + + /// Internal Acessors for SubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.SubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SubnetOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SubnetOcid = value; } + + /// Internal Acessors for TotalFileSystemStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.TotalFileSystemStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TotalFileSystemStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TotalFileSystemStorage = value; } + + /// Internal Acessors for VMFileSystemStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.VMFileSystemStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VMFileSystemStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VMFileSystemStorage = value; } + + /// Internal Acessors for VipId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.VipId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VipId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VipId = value; } + + /// Internal Acessors for ZoneOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal.ZoneOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ZoneOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ZoneOcid = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; } + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? NodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).NodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).NodeCount = value ?? default(int); } + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).NsgCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).NsgCidr = value ?? null /* arrayOf */; } + + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string NsgUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).NsgUrl; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).OciUrl; } + + /// ExadbVmCluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Ocid; } + + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PrivateZoneOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).PrivateZoneOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).PrivateZoneOcid = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterProperties()); set => this._property = value; } + + /// Exadata VM cluster on Exascale Infrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ProvisioningState; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScanDnsName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanDnsName; } + + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ScanDnsRecordId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanDnsRecordId; } + + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN + /// IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the + /// requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] ScanIPId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanIPId; } + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ScanListenerPortTcp { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanListenerPortTcp; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanListenerPortTcp = value ?? default(int); } + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? ScanListenerPortTcpSsl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanListenerPortTcpSsl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ScanListenerPortTcpSsl = value ?? default(int); } + + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).Shape = value ?? null; } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? SnapshotFileSystemStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SnapshotFileSystemStorageTotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SnapshotFileSystemStorageTotalSizeInGb = value ?? default(int); } + + /// + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SubnetId = value ?? null; } + + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SubnetOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SubnetOcid; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SystemVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SystemVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).SystemVersion = value ?? null; } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TimeZone = value ?? null; } + + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? TotalEcpuCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TotalEcpuCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TotalEcpuCount = value ?? default(int); } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? TotalFileSystemStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TotalFileSystemStorageTotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).TotalFileSystemStorageTotalSizeInGb = value ?? default(int); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? VMFileSystemStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VMFileSystemStorageTotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VMFileSystemStorageTotalSizeInGb = value ?? default(int); } + + /// + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services + /// (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If + /// one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this + /// list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] VipId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VipId; } + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string VnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).VnetId = value ?? null; } + + /// Backing field for property. + private string[] _zone; + + /// The availability zones. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] Zone { get => this._zone; set => this._zone = value; } + + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ZoneOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)Property).ZoneOcid; } + + /// Creates an new instance. + public ExadbVMCluster() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// ExadbVmCluster resource definition + public partial interface IExadbVMCluster : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetCidr { get; set; } + /// Cluster backup subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster backup subnet ocid", + SerializedName = @"backupSubnetOcid", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetOcid { get; } + /// + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, + /// and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and + /// is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + string ClusterName { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A domain name used for the Exadata VM cluster on Exascale Infrastructure", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; set; } + /// + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"enabledEcpuCount", + PossibleTypes = new [] { typeof(int) })] + int? EnabledEcpuCount { get; set; } + /// The Azure Resource ID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure Resource ID of the Exadata Database Storage Vault.", + SerializedName = @"exascaleDbStorageVaultId", + PossibleTypes = new [] { typeof(string) })] + string ExascaleDbStorageVaultId { get; set; } + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; } + /// + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API", + SerializedName = @"gridImageOcid", + PossibleTypes = new [] { typeof(string) })] + string GridImageOcid { get; set; } + /// The type of Grid Image + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of Grid Image", + SerializedName = @"gridImageType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? GridImageType { get; } + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The hostname for the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudVmCluster lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? LifecycleState { get; } + /// + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"listenerPort", + PossibleTypes = new [] { typeof(int) })] + int? ListenerPort { get; } + /// + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int? NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface.", + SerializedName = @"nsgUrl", + PossibleTypes = new [] { typeof(string) })] + string NsgUrl { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// ExadbVmCluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ExadbVmCluster ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with.", + SerializedName = @"privateZoneOcid", + PossibleTypes = new [] { typeof(string) })] + string PrivateZoneOcid { get; set; } + /// Exadata VM cluster on Exascale Infrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata VM cluster on Exascale Infrastructure provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. ", + SerializedName = @"scanDnsName", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsName { get; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"scanDnsRecordId", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsRecordId { get; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN + /// IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the + /// requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"scanIpIds", + PossibleTypes = new [] { typeof(string) })] + string[] ScanIPId { get; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcpSsl { get; set; } + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The shape of the Exadata VM cluster on Exascale Infrastructure resource", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? SnapshotFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + string[] SshPublicKey { get; set; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster subnet ocid", + SerializedName = @"subnetOcid", + PossibleTypes = new [] { typeof(string) })] + string SubnetOcid { get; } + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; set; } + /// + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"totalEcpuCount", + PossibleTypes = new [] { typeof(int) })] + int? TotalEcpuCount { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? TotalFileSystemStorageTotalSizeInGb { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? VMFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services + /// (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If + /// one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this + /// list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"vipIds", + PossibleTypes = new [] { typeof(string) })] + string[] VipId { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// The availability zones. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability zones.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + string[] Zone { get; set; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with.", + SerializedName = @"zoneOcid", + PossibleTypes = new [] { typeof(string) })] + string ZoneOcid { get; } + + } + /// ExadbVmCluster resource definition + internal partial interface IExadbVMClusterInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal + { + string AzureAsyncOperation { get; set; } + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + string BackupSubnetCidr { get; set; } + /// Cluster backup subnet ocid + string BackupSubnetOcid { get; set; } + /// + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, + /// and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and + /// is not case sensitive. + /// + string ClusterName { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// Display Name + string DisplayName { get; set; } + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure + string Domain { get; set; } + /// + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// + int? EnabledEcpuCount { get; set; } + /// The Azure Resource ID of the Exadata Database Storage Vault. + string ExascaleDbStorageVaultId { get; set; } + /// Oracle Grid Infrastructure (GI) software version + string GiVersion { get; set; } + /// + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + /// + string GridImageOcid { get; set; } + /// The type of Grid Image + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? GridImageType { get; set; } + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + string Hostname { get; set; } + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig IormConfigCache { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudVmCluster lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? LifecycleState { get; set; } + /// + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// + int? ListenerPort { get; set; } + /// + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// + int? MemorySizeInGb { get; set; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + int? NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + string NsgUrl { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// ExadbVmCluster ocid + string Ocid { get; set; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + string PrivateZoneOcid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties Property { get; set; } + /// Exadata VM cluster on Exascale Infrastructure provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + + int? RetryAfter { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + string ScanDnsName { get; set; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + string ScanDnsRecordId { get; set; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN + /// IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the + /// requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + string[] ScanIPId { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + int? ScanListenerPortTcpSsl { get; set; } + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource + string Shape { get; set; } + /// Snapshot filesystem storage details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails SnapshotFileSystemStorage { get; set; } + /// Total Capacity + int? SnapshotFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// + string[] SshPublicKey { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// Cluster subnet ocid + string SubnetOcid { get; set; } + /// Operating system version of the image. + string SystemVersion { get; set; } + /// + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + string TimeZone { get; set; } + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + int? TotalEcpuCount { get; set; } + /// Total file system storage details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails TotalFileSystemStorage { get; set; } + /// Total Capacity + int? TotalFileSystemStorageTotalSizeInGb { get; set; } + /// Filesystem storage details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails VMFileSystemStorage { get; set; } + /// Total Capacity + int? VMFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services + /// (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If + /// one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this + /// list is empty. + /// + string[] VipId { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// The availability zones. + string[] Zone { get; set; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + string ZoneOcid { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.json.cs new file mode 100644 index 000000000000..031d27edaf7a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMCluster.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExadbVmCluster resource definition + public partial class ExadbVMCluster + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMCluster(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterProperties.FromJson(__jsonProperties) : Property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Zone;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMCluster(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.PowerShell.cs new file mode 100644 index 000000000000..c3701c8bcb86 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a ExadbVmCluster list operation. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterListResultTypeConverter))] + public partial class ExadbVMClusterListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClusterListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClusterListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClusterListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClusterListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a ExadbVmCluster list operation. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterListResultTypeConverter))] + public partial interface IExadbVMClusterListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.TypeConverter.cs new file mode 100644 index 000000000000..f11b8cb87f56 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClusterListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClusterListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClusterListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClusterListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.cs new file mode 100644 index 000000000000..d5fb005f92bc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a ExadbVmCluster list operation. + public partial class ExadbVMClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster[] _value; + + /// The ExadbVmCluster items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ExadbVMClusterListResult() + { + + } + } + /// The response of a ExadbVmCluster list operation. + public partial interface IExadbVMClusterListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The ExadbVmCluster items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ExadbVmCluster items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster[] Value { get; set; } + + } + /// The response of a ExadbVmCluster list operation. + internal partial interface IExadbVMClusterListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The ExadbVmCluster items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.json.cs new file mode 100644 index 000000000000..8665a6d97e63 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a ExadbVmCluster list operation. + public partial class ExadbVMClusterListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClusterListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClusterListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.PowerShell.cs new file mode 100644 index 000000000000..206922f6eaaa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.PowerShell.cs @@ -0,0 +1,562 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// ExadbVmCluster resource model + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterPropertiesTypeConverter))] + public partial class ExadbVMClusterProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClusterProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClusterProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClusterProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("VMFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("VMFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("SnapshotFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("TotalFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("TotalFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("EnabledEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).EnabledEcpuCount = (int) content.GetValueForProperty("EnabledEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).EnabledEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExascaleDbStorageVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ExascaleDbStorageVaultId = (string) content.GetValueForProperty("ExascaleDbStorageVaultId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ExascaleDbStorageVaultId, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageOcid, global::System.Convert.ToString); + } + if (content.Contains("GridImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType?) content.GetValueForProperty("GridImageType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType.CreateFrom); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NodeCount = (int) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("ZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ZoneOcid = (string) content.GetValueForProperty("ZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("PrivateZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).PrivateZoneOcid = (string) content.GetValueForProperty("PrivateZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).PrivateZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ListenerPort = (int?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ListenerPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("TotalEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalEcpuCount = (int) content.GetValueForProperty("TotalEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetOcid = (string) content.GetValueForProperty("BackupSubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VMFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("VMFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SnapshotFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("SnapshotFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("TotalFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClusterProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DataCollectionOption")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOption = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions) content.GetValueForProperty("DataCollectionOption",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOption, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptionsTypeConverter.ConvertFrom); + } + if (content.Contains("VMFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("VMFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("SnapshotFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("TotalFileSystemStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails) content.GetValueForProperty("TotalFileSystemStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("IormConfigCache")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCache = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig) content.GetValueForProperty("IormConfigCache",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCache, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("ClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ClusterName = (string) content.GetValueForProperty("ClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ClusterName, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetCidr = (string) content.GetValueForProperty("BackupSubnetCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetCidr, global::System.Convert.ToString); + } + if (content.Contains("NsgUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgUrl = (string) content.GetValueForProperty("NsgUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgUrl, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState.CreateFrom); + } + if (content.Contains("VnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VnetId = (string) content.GetValueForProperty("VnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VnetId, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("EnabledEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).EnabledEcpuCount = (int) content.GetValueForProperty("EnabledEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).EnabledEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ExascaleDbStorageVaultId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ExascaleDbStorageVaultId = (string) content.GetValueForProperty("ExascaleDbStorageVaultId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ExascaleDbStorageVaultId, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageOcid, global::System.Convert.ToString); + } + if (content.Contains("GridImageType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType?) content.GetValueForProperty("GridImageType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GridImageType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType.CreateFrom); + } + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LicenseModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LicenseModel = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel?) content.GetValueForProperty("LicenseModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LicenseModel, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel.CreateFrom); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NodeCount = (int) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NsgCidr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgCidr = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[]) content.GetValueForProperty("NsgCidr",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).NsgCidr, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidrTypeConverter.ConvertFrom)); + } + if (content.Contains("ZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ZoneOcid = (string) content.GetValueForProperty("ZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("PrivateZoneOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).PrivateZoneOcid = (string) content.GetValueForProperty("PrivateZoneOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).PrivateZoneOcid, global::System.Convert.ToString); + } + if (content.Contains("ScanListenerPortTcp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcp = (int?) content.GetValueForProperty("ScanListenerPortTcp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcp, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ScanListenerPortTcpSsl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl = (int?) content.GetValueForProperty("ScanListenerPortTcpSsl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanListenerPortTcpSsl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ListenerPort")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ListenerPort = (int?) content.GetValueForProperty("ListenerPort",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ListenerPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SshPublicKey = (string[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("TotalEcpuCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalEcpuCount = (int) content.GetValueForProperty("TotalEcpuCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalEcpuCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ScanDnsName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsName = (string) content.GetValueForProperty("ScanDnsName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsName, global::System.Convert.ToString); + } + if (content.Contains("ScanIPId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanIPId = (string[]) content.GetValueForProperty("ScanIPId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanIPId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ScanDnsRecordId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsRecordId = (string) content.GetValueForProperty("ScanDnsRecordId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).ScanDnsRecordId, global::System.Convert.ToString); + } + if (content.Contains("VipId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VipId = (string[]) content.GetValueForProperty("VipId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VipId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("BackupSubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetOcid = (string) content.GetValueForProperty("BackupSubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).BackupSubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("SubnetOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetOcid = (string) content.GetValueForProperty("SubnetOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SubnetOcid, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheObjective")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheObjective = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective?) content.GetValueForProperty("IormConfigCacheObjective",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheObjective, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective.CreateFrom); + } + if (content.Contains("DataCollectionOptionIsDiagnosticsEventsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsDiagnosticsEventsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsDiagnosticsEventsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsHealthMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsHealthMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsHealthMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DataCollectionOptionIsIncidentLogsEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled = (bool?) content.GetValueForProperty("DataCollectionOptionIsIncidentLogsEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).DataCollectionOptionIsIncidentLogsEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("VMFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("VMFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).VMFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SnapshotFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("SnapshotFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).SnapshotFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalFileSystemStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorageTotalSizeInGb = (int) content.GetValueForProperty("TotalFileSystemStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).TotalFileSystemStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IormConfigCacheDbPlan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheDbPlan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[]) content.GetValueForProperty("IormConfigCacheDbPlan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheDbPlan, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbIormConfigTypeConverter.ConvertFrom)); + } + if (content.Contains("IormConfigCacheLifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail = (string) content.GetValueForProperty("IormConfigCacheLifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("IormConfigCacheLifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState?) content.GetValueForProperty("IormConfigCacheLifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal)this).IormConfigCacheLifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// ExadbVmCluster resource model + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterPropertiesTypeConverter))] + public partial interface IExadbVMClusterProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.TypeConverter.cs new file mode 100644 index 000000000000..bf886fcff462 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClusterPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClusterProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClusterProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClusterProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.cs new file mode 100644 index 000000000000..bb559cf24351 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.cs @@ -0,0 +1,1070 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExadbVmCluster resource model + public partial class ExadbVMClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal + { + + /// Backing field for property. + private string _backupSubnetCidr; + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string BackupSubnetCidr { get => this._backupSubnetCidr; set => this._backupSubnetCidr = value; } + + /// Backing field for property. + private string _backupSubnetOcid; + + /// Cluster backup subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string BackupSubnetOcid { get => this._backupSubnetOcid; } + + /// Backing field for property. + private string _clusterName; + + /// + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, + /// and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and + /// is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ClusterName { get => this._clusterName; set => this._clusterName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions _dataCollectionOption; + + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions()); set => this._dataCollectionOption = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsDiagnosticsEventsEnabled = value ?? default(bool); } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsHealthMonitoringEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsHealthMonitoringEnabled = value ?? default(bool); } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public bool? DataCollectionOptionIsIncidentLogsEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptionsInternal)DataCollectionOption).IsIncidentLogsEnabled = value ?? default(bool); } + + /// Backing field for property. + private string _displayName; + + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _domain; + + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Domain { get => this._domain; set => this._domain = value; } + + /// Backing field for property. + private int _enabledEcpuCount; + + /// + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int EnabledEcpuCount { get => this._enabledEcpuCount; set => this._enabledEcpuCount = value; } + + /// Backing field for property. + private string _exascaleDbStorageVaultId; + + /// The Azure Resource ID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ExascaleDbStorageVaultId { get => this._exascaleDbStorageVaultId; set => this._exascaleDbStorageVaultId = value; } + + /// Backing field for property. + private string _giVersion; + + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string GiVersion { get => this._giVersion; } + + /// Backing field for property. + private string _gridImageOcid; + + /// + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string GridImageOcid { get => this._gridImageOcid; set => this._gridImageOcid = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? _gridImageType; + + /// The type of Grid Image + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? GridImageType { get => this._gridImageType; } + + /// Backing field for property. + private string _hostname; + + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Hostname { get => this._hostname; set => this._hostname = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig _iormConfigCache; + + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig IormConfigCache { get => (this._iormConfigCache = this._iormConfigCache ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig()); } + + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).DbPlan; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).DbPlan = value ?? null /* arrayOf */; } + + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string IormConfigCacheLifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleDetail = value ?? null; } + + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).LifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState)""); } + + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).Objective; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfigInternal)IormConfigCache).Objective = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? _licenseModel; + + /// + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get => this._licenseModel; set => this._licenseModel = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? _lifecycleState; + + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? LifecycleState { get => this._lifecycleState; } + + /// Backing field for property. + private int? _listenerPort; + + /// + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ListenerPort { get => this._listenerPort; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; } + + /// Internal Acessors for BackupSubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.BackupSubnetOcid { get => this._backupSubnetOcid; set { {_backupSubnetOcid = value;} } } + + /// Internal Acessors for DataCollectionOption + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.DataCollectionOption { get => (this._dataCollectionOption = this._dataCollectionOption ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions()); set { {_dataCollectionOption = value;} } } + + /// Internal Acessors for GiVersion + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.GiVersion { get => this._giVersion; set { {_giVersion = value;} } } + + /// Internal Acessors for GridImageType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.GridImageType { get => this._gridImageType; set { {_gridImageType = value;} } } + + /// Internal Acessors for IormConfigCache + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.IormConfigCache { get => (this._iormConfigCache = this._iormConfigCache ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig()); set { {_iormConfigCache = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for ListenerPort + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.ListenerPort { get => this._listenerPort; set { {_listenerPort = value;} } } + + /// Internal Acessors for MemorySizeInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.MemorySizeInGb { get => this._memorySizeInGb; set { {_memorySizeInGb = value;} } } + + /// Internal Acessors for NsgUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.NsgUrl { get => this._nsgUrl; set { {_nsgUrl = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for ScanDnsName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.ScanDnsName { get => this._scanDnsName; set { {_scanDnsName = value;} } } + + /// Internal Acessors for ScanDnsRecordId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.ScanDnsRecordId { get => this._scanDnsRecordId; set { {_scanDnsRecordId = value;} } } + + /// Internal Acessors for ScanIPId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.ScanIPId { get => this._scanIPId; set { {_scanIPId = value;} } } + + /// Internal Acessors for SnapshotFileSystemStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.SnapshotFileSystemStorage { get => (this._snapshotFileSystemStorage = this._snapshotFileSystemStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails()); set { {_snapshotFileSystemStorage = value;} } } + + /// Internal Acessors for SubnetOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.SubnetOcid { get => this._subnetOcid; set { {_subnetOcid = value;} } } + + /// Internal Acessors for TotalFileSystemStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.TotalFileSystemStorage { get => (this._totalFileSystemStorage = this._totalFileSystemStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails()); set { {_totalFileSystemStorage = value;} } } + + /// Internal Acessors for VMFileSystemStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.VMFileSystemStorage { get => (this._vMFileSystemStorage = this._vMFileSystemStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails()); set { {_vMFileSystemStorage = value;} } } + + /// Internal Acessors for VipId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.VipId { get => this._vipId; set { {_vipId = value;} } } + + /// Internal Acessors for ZoneOcid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterPropertiesInternal.ZoneOcid { get => this._zoneOcid; set { {_zoneOcid = value;} } } + + /// Backing field for property. + private int _nodeCount; + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int NodeCount { get => this._nodeCount; set => this._nodeCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] _nsgCidr; + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get => this._nsgCidr; set => this._nsgCidr = value; } + + /// Backing field for property. + private string _nsgUrl; + + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NsgUrl { get => this._nsgUrl; } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// ExadbVmCluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private string _privateZoneOcid; + + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PrivateZoneOcid { get => this._privateZoneOcid; set => this._privateZoneOcid = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// Exadata VM cluster on Exascale Infrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _scanDnsName; + + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScanDnsName { get => this._scanDnsName; } + + /// Backing field for property. + private string _scanDnsRecordId; + + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScanDnsRecordId { get => this._scanDnsRecordId; } + + /// Backing field for property. + private string[] _scanIPId; + + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN + /// IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the + /// requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] ScanIPId { get => this._scanIPId; } + + /// Backing field for property. + private int? _scanListenerPortTcp; + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ScanListenerPortTcp { get => this._scanListenerPortTcp; set => this._scanListenerPortTcp = value; } + + /// Backing field for property. + private int? _scanListenerPortTcpSsl; + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? ScanListenerPortTcpSsl { get => this._scanListenerPortTcpSsl; set => this._scanListenerPortTcpSsl = value; } + + /// Backing field for property. + private string _shape; + + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Shape { get => this._shape; set => this._shape = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails _snapshotFileSystemStorage; + + /// Snapshot filesystem storage details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails SnapshotFileSystemStorage { get => (this._snapshotFileSystemStorage = this._snapshotFileSystemStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails()); } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? SnapshotFileSystemStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)SnapshotFileSystemStorage).TotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)SnapshotFileSystemStorage).TotalSizeInGb = value ?? default(int); } + + /// Backing field for property. + private string[] _sshPublicKey; + + /// + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] SshPublicKey { get => this._sshPublicKey; set => this._sshPublicKey = value; } + + /// Backing field for property. + private string _subnetId; + + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private string _subnetOcid; + + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubnetOcid { get => this._subnetOcid; } + + /// Backing field for property. + private string _systemVersion; + + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SystemVersion { get => this._systemVersion; set => this._systemVersion = value; } + + /// Backing field for property. + private string _timeZone; + + /// + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Backing field for property. + private int _totalEcpuCount; + + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int TotalEcpuCount { get => this._totalEcpuCount; set => this._totalEcpuCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails _totalFileSystemStorage; + + /// Total file system storage details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails TotalFileSystemStorage { get => (this._totalFileSystemStorage = this._totalFileSystemStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails()); } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? TotalFileSystemStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)TotalFileSystemStorage).TotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)TotalFileSystemStorage).TotalSizeInGb = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails _vMFileSystemStorage; + + /// Filesystem storage details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails VMFileSystemStorage { get => (this._vMFileSystemStorage = this._vMFileSystemStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails()); set => this._vMFileSystemStorage = value; } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int VMFileSystemStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)VMFileSystemStorage).TotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)VMFileSystemStorage).TotalSizeInGb = value ; } + + /// Backing field for property. + private string[] _vipId; + + /// + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services + /// (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If + /// one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this + /// list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] VipId { get => this._vipId; } + + /// Backing field for property. + private string _vnetId; + + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string VnetId { get => this._vnetId; set => this._vnetId = value; } + + /// Backing field for property. + private string _zoneOcid; + + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ZoneOcid { get => this._zoneOcid; } + + /// Creates an new instance. + public ExadbVMClusterProperties() + { + + } + } + /// ExadbVmCluster resource model + public partial interface IExadbVMClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetCidr { get; set; } + /// Cluster backup subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster backup subnet ocid", + SerializedName = @"backupSubnetOcid", + PossibleTypes = new [] { typeof(string) })] + string BackupSubnetOcid { get; } + /// + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, + /// and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and + /// is not case sensitive. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + string ClusterName { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// Display Name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A domain name used for the Exadata VM cluster on Exascale Infrastructure", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; set; } + /// + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"enabledEcpuCount", + PossibleTypes = new [] { typeof(int) })] + int EnabledEcpuCount { get; set; } + /// The Azure Resource ID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The Azure Resource ID of the Exadata Database Storage Vault.", + SerializedName = @"exascaleDbStorageVaultId", + PossibleTypes = new [] { typeof(string) })] + string ExascaleDbStorageVaultId { get; set; } + /// Oracle Grid Infrastructure (GI) software version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; } + /// + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API", + SerializedName = @"gridImageOcid", + PossibleTypes = new [] { typeof(string) })] + string GridImageOcid { get; set; } + /// The type of Grid Image + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of Grid Image", + SerializedName = @"gridImageType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? GridImageType { get; } + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The hostname for the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An array of IORM settings for all the database in the Exadata DB system.", + SerializedName = @"dbPlans", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the current lifecycleState.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of IORM configuration for the Exadata DB system.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current value for the IORM objective. The default is AUTO.", + SerializedName = @"objective", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// CloudVmCluster lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"CloudVmCluster lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? LifecycleState { get; } + /// + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"listenerPort", + PossibleTypes = new [] { typeof(int) })] + int? ListenerPort { get; } + /// + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface.", + SerializedName = @"nsgUrl", + PossibleTypes = new [] { typeof(string) })] + string NsgUrl { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// ExadbVmCluster ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"ExadbVmCluster ocid", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with.", + SerializedName = @"privateZoneOcid", + PossibleTypes = new [] { typeof(string) })] + string PrivateZoneOcid { get; set; } + /// Exadata VM cluster on Exascale Infrastructure provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata VM cluster on Exascale Infrastructure provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. ", + SerializedName = @"scanDnsName", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsName { get; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"scanDnsRecordId", + PossibleTypes = new [] { typeof(string) })] + string ScanDnsRecordId { get; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN + /// IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the + /// requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"scanIpIds", + PossibleTypes = new [] { typeof(string) })] + string[] ScanIPId { get; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + int? ScanListenerPortTcpSsl { get; set; } + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The shape of the Exadata VM cluster on Exascale Infrastructure resource", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? SnapshotFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + string[] SshPublicKey { get; set; } + /// Client subnet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// Cluster subnet ocid + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cluster subnet ocid", + SerializedName = @"subnetOcid", + PossibleTypes = new [] { typeof(string) })] + string SubnetOcid { get; } + /// Operating system version of the image. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; set; } + /// + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"totalEcpuCount", + PossibleTypes = new [] { typeof(int) })] + int TotalEcpuCount { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? TotalFileSystemStorageTotalSizeInGb { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int VMFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services + /// (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If + /// one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this + /// list is empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this list is empty.", + SerializedName = @"vipIds", + PossibleTypes = new [] { typeof(string) })] + string[] VipId { get; } + /// VNET for network connectivity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + string VnetId { get; set; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with.", + SerializedName = @"zoneOcid", + PossibleTypes = new [] { typeof(string) })] + string ZoneOcid { get; } + + } + /// ExadbVmCluster resource model + internal partial interface IExadbVMClusterPropertiesInternal + + { + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + string BackupSubnetCidr { get; set; } + /// Cluster backup subnet ocid + string BackupSubnetOcid { get; set; } + /// + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, + /// and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and + /// is not case sensitive. + /// + string ClusterName { get; set; } + /// + /// Indicates user preferences for the various diagnostic collection options for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDataCollectionOptions DataCollectionOption { get; set; } + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + bool? DataCollectionOptionIsDiagnosticsEventsEnabled { get; set; } + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsHealthMonitoringEnabled { get; set; } + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + bool? DataCollectionOptionIsIncidentLogsEnabled { get; set; } + /// Display Name + string DisplayName { get; set; } + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure + string Domain { get; set; } + /// + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// + int EnabledEcpuCount { get; set; } + /// The Azure Resource ID of the Exadata Database Storage Vault. + string ExascaleDbStorageVaultId { get; set; } + /// Oracle Grid Infrastructure (GI) software version + string GiVersion { get; set; } + /// + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + /// + string GridImageOcid { get; set; } + /// The type of Grid Image + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType? GridImageType { get; set; } + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + string Hostname { get; set; } + /// iormConfigCache details for Exadata VM cluster on Exascale Infrastructure. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadataIormConfig IormConfigCache { get; set; } + /// An array of IORM settings for all the database in the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbIormConfig[] IormConfigCacheDbPlan { get; set; } + /// Additional information about the current lifecycleState. + string IormConfigCacheLifecycleDetail { get; set; } + /// The current state of IORM configuration for the Exadata DB system. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState? IormConfigCacheLifecycleState { get; set; } + /// The current value for the IORM objective. The default is AUTO. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective? IormConfigCacheObjective { get; set; } + /// + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel? LicenseModel { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// CloudVmCluster lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState? LifecycleState { get; set; } + /// + /// The port number configured for the listener on the Exadata VM cluster on Exascale Infrastructure. + /// + int? ListenerPort { get; set; } + /// + /// The memory that you want to be allocated in GBs. Memory is calculated based on 11 GB per VM core reserved. + /// + int? MemorySizeInGb { get; set; } + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + int NodeCount { get; set; } + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get; set; } + /// + /// HTTPS link to OCI Network Security Group exposed to Azure Customer via the Azure Interface. + /// + string NsgUrl { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// ExadbVmCluster ocid + string Ocid { get; set; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + string PrivateZoneOcid { get; set; } + /// Exadata VM cluster on Exascale Infrastructure provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// + /// The FQDN of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + string ScanDnsName { get; set; } + /// + /// The OCID of the DNS record for the SCAN IP addresses that are associated with the Exadata VM cluster on Exascale Infrastructure. + /// + string ScanDnsRecordId { get; set; } + /// + /// The Single Client Access Name (SCAN) IP addresses associated with the Exadata VM cluster on Exascale Infrastructure. SCAN + /// IP addresses are typically used for load balancing and are not assigned to any interface. Oracle Clusterware directs the + /// requests to the appropriate nodes in the cluster. **Note:** For a single-node DB system, this list is empty. + /// + string[] ScanIPId { get; set; } + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + int? ScanListenerPortTcp { get; set; } + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + int? ScanListenerPortTcpSsl { get; set; } + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource + string Shape { get; set; } + /// Snapshot filesystem storage details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails SnapshotFileSystemStorage { get; set; } + /// Total Capacity + int? SnapshotFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// + string[] SshPublicKey { get; set; } + /// Client subnet + string SubnetId { get; set; } + /// Cluster subnet ocid + string SubnetOcid { get; set; } + /// Operating system version of the image. + string SystemVersion { get; set; } + /// + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + string TimeZone { get; set; } + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + int TotalEcpuCount { get; set; } + /// Total file system storage details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails TotalFileSystemStorage { get; set; } + /// Total Capacity + int? TotalFileSystemStorageTotalSizeInGb { get; set; } + /// Filesystem storage details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails VMFileSystemStorage { get; set; } + /// Total Capacity + int VMFileSystemStorageTotalSizeInGb { get; set; } + /// + /// The virtual IP (VIP) addresses associated with the Exadata VM cluster on Exascale Infrastructure. The Cluster Ready Services + /// (CRS) creates and maintains one VIP address for each node in the Exadata Cloud Service instance to enable failover. If + /// one node fails, the VIP is reassigned to another active node in the cluster. **Note:** For a single-node DB system, this + /// list is empty. + /// + string[] VipId { get; set; } + /// VNET for network connectivity + string VnetId { get; set; } + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + string ZoneOcid { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.json.cs new file mode 100644 index 000000000000..3785dfeeb1b3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterProperties.json.cs @@ -0,0 +1,284 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExadbVmCluster resource model + public partial class ExadbVMClusterProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dataCollectionOption = If( json?.PropertyT("dataCollectionOptions"), out var __jsonDataCollectionOptions) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DataCollectionOptions.FromJson(__jsonDataCollectionOptions) : DataCollectionOption;} + {_vMFileSystemStorage = If( json?.PropertyT("vmFileSystemStorage"), out var __jsonVMFileSystemStorage) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails.FromJson(__jsonVMFileSystemStorage) : VMFileSystemStorage;} + {_snapshotFileSystemStorage = If( json?.PropertyT("snapshotFileSystemStorage"), out var __jsonSnapshotFileSystemStorage) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails.FromJson(__jsonSnapshotFileSystemStorage) : SnapshotFileSystemStorage;} + {_totalFileSystemStorage = If( json?.PropertyT("totalFileSystemStorage"), out var __jsonTotalFileSystemStorage) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterStorageDetails.FromJson(__jsonTotalFileSystemStorage) : TotalFileSystemStorage;} + {_iormConfigCache = If( json?.PropertyT("iormConfigCache"), out var __jsonIormConfigCache) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadataIormConfig.FromJson(__jsonIormConfigCache) : IormConfigCache;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_clusterName = If( json?.PropertyT("clusterName"), out var __jsonClusterName) ? (string)__jsonClusterName : (string)ClusterName;} + {_backupSubnetCidr = If( json?.PropertyT("backupSubnetCidr"), out var __jsonBackupSubnetCidr) ? (string)__jsonBackupSubnetCidr : (string)BackupSubnetCidr;} + {_nsgUrl = If( json?.PropertyT("nsgUrl"), out var __jsonNsgUrl) ? (string)__jsonNsgUrl : (string)NsgUrl;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_vnetId = If( json?.PropertyT("vnetId"), out var __jsonVnetId) ? (string)__jsonVnetId : (string)VnetId;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_domain = If( json?.PropertyT("domain"), out var __jsonDomain) ? (string)__jsonDomain : (string)Domain;} + {_enabledEcpuCount = If( json?.PropertyT("enabledEcpuCount"), out var __jsonEnabledEcpuCount) ? (int)__jsonEnabledEcpuCount : EnabledEcpuCount;} + {_exascaleDbStorageVaultId = If( json?.PropertyT("exascaleDbStorageVaultId"), out var __jsonExascaleDbStorageVaultId) ? (string)__jsonExascaleDbStorageVaultId : (string)ExascaleDbStorageVaultId;} + {_gridImageOcid = If( json?.PropertyT("gridImageOcid"), out var __jsonGridImageOcid) ? (string)__jsonGridImageOcid : (string)GridImageOcid;} + {_gridImageType = If( json?.PropertyT("gridImageType"), out var __jsonGridImageType) ? (string)__jsonGridImageType : (string)GridImageType;} + {_giVersion = If( json?.PropertyT("giVersion"), out var __jsonGiVersion) ? (string)__jsonGiVersion : (string)GiVersion;} + {_hostname = If( json?.PropertyT("hostname"), out var __jsonHostname) ? (string)__jsonHostname : (string)Hostname;} + {_licenseModel = If( json?.PropertyT("licenseModel"), out var __jsonLicenseModel) ? (string)__jsonLicenseModel : (string)LicenseModel;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : MemorySizeInGb;} + {_nodeCount = If( json?.PropertyT("nodeCount"), out var __jsonNodeCount) ? (int)__jsonNodeCount : NodeCount;} + {_nsgCidr = If( json?.PropertyT("nsgCidrs"), out var __jsonNsgCidrs) ? If( __jsonNsgCidrs as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.NsgCidr.FromJson(__u) )) ))() : null : NsgCidr;} + {_zoneOcid = If( json?.PropertyT("zoneOcid"), out var __jsonZoneOcid) ? (string)__jsonZoneOcid : (string)ZoneOcid;} + {_privateZoneOcid = If( json?.PropertyT("privateZoneOcid"), out var __jsonPrivateZoneOcid) ? (string)__jsonPrivateZoneOcid : (string)PrivateZoneOcid;} + {_scanListenerPortTcp = If( json?.PropertyT("scanListenerPortTcp"), out var __jsonScanListenerPortTcp) ? (int?)__jsonScanListenerPortTcp : ScanListenerPortTcp;} + {_scanListenerPortTcpSsl = If( json?.PropertyT("scanListenerPortTcpSsl"), out var __jsonScanListenerPortTcpSsl) ? (int?)__jsonScanListenerPortTcpSsl : ScanListenerPortTcpSsl;} + {_listenerPort = If( json?.PropertyT("listenerPort"), out var __jsonListenerPort) ? (int?)__jsonListenerPort : ListenerPort;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)Shape;} + {_sshPublicKey = If( json?.PropertyT("sshPublicKeys"), out var __jsonSshPublicKeys) ? If( __jsonSshPublicKeys as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : SshPublicKey;} + {_systemVersion = If( json?.PropertyT("systemVersion"), out var __jsonSystemVersion) ? (string)__jsonSystemVersion : (string)SystemVersion;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_totalEcpuCount = If( json?.PropertyT("totalEcpuCount"), out var __jsonTotalEcpuCount) ? (int)__jsonTotalEcpuCount : TotalEcpuCount;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_scanDnsName = If( json?.PropertyT("scanDnsName"), out var __jsonScanDnsName) ? (string)__jsonScanDnsName : (string)ScanDnsName;} + {_scanIPId = If( json?.PropertyT("scanIpIds"), out var __jsonScanIPIds) ? If( __jsonScanIPIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(string) (__k is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __j ? (string)(__j.ToString()) : null)) ))() : null : ScanIPId;} + {_scanDnsRecordId = If( json?.PropertyT("scanDnsRecordId"), out var __jsonScanDnsRecordId) ? (string)__jsonScanDnsRecordId : (string)ScanDnsRecordId;} + {_vipId = If( json?.PropertyT("vipIds"), out var __jsonVipIds) ? If( __jsonVipIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(string) (__f is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __e ? (string)(__e.ToString()) : null)) ))() : null : VipId;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)OciUrl;} + {_backupSubnetOcid = If( json?.PropertyT("backupSubnetOcid"), out var __jsonBackupSubnetOcid) ? (string)__jsonBackupSubnetOcid : (string)BackupSubnetOcid;} + {_subnetOcid = If( json?.PropertyT("subnetOcid"), out var __jsonSubnetOcid) ? (string)__jsonSubnetOcid : (string)SubnetOcid;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClusterProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dataCollectionOption ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._dataCollectionOption.ToJson(null,serializationMode) : null, "dataCollectionOptions" ,container.Add ); + AddIf( null != this._vMFileSystemStorage ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._vMFileSystemStorage.ToJson(null,serializationMode) : null, "vmFileSystemStorage" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._snapshotFileSystemStorage ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._snapshotFileSystemStorage.ToJson(null,serializationMode) : null, "snapshotFileSystemStorage" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._totalFileSystemStorage ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._totalFileSystemStorage.ToJson(null,serializationMode) : null, "totalFileSystemStorage" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._iormConfigCache ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._iormConfigCache.ToJson(null,serializationMode) : null, "iormConfigCache" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + AddIf( null != (((object)this._clusterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._clusterName.ToString()) : null, "clusterName" ,container.Add ); + AddIf( null != (((object)this._backupSubnetCidr)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._backupSubnetCidr.ToString()) : null, "backupSubnetCidr" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nsgUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nsgUrl.ToString()) : null, "nsgUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + AddIf( null != (((object)this._vnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._vnetId.ToString()) : null, "vnetId" ,container.Add ); + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._enabledEcpuCount), "enabledEcpuCount" ,container.Add ); + AddIf( null != (((object)this._exascaleDbStorageVaultId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._exascaleDbStorageVaultId.ToString()) : null, "exascaleDbStorageVaultId" ,container.Add ); + AddIf( null != (((object)this._gridImageOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._gridImageOcid.ToString()) : null, "gridImageOcid" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._gridImageType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._gridImageType.ToString()) : null, "gridImageType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._giVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._giVersion.ToString()) : null, "giVersion" ,container.Add ); + } + AddIf( null != (((object)this._hostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hostname.ToString()) : null, "hostname" ,container.Add ); + AddIf( null != (((object)this._licenseModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._licenseModel.ToString()) : null, "licenseModel" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._nodeCount), "nodeCount" ,container.Add ); + if (null != this._nsgCidr) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._nsgCidr ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("nsgCidrs",__w); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._zoneOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._zoneOcid.ToString()) : null, "zoneOcid" ,container.Add ); + } + AddIf( null != (((object)this._privateZoneOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._privateZoneOcid.ToString()) : null, "privateZoneOcid" ,container.Add ); + AddIf( null != this._scanListenerPortTcp ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._scanListenerPortTcp) : null, "scanListenerPortTcp" ,container.Add ); + AddIf( null != this._scanListenerPortTcpSsl ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._scanListenerPortTcpSsl) : null, "scanListenerPortTcpSsl" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._listenerPort ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._listenerPort) : null, "listenerPort" ,container.Add ); + } + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + if (null != this._sshPublicKey) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._sshPublicKey ) + { + AddIf(null != (((object)__s)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__s.ToString()) : null ,__r.Add); + } + container.Add("sshPublicKeys",__r); + } + AddIf( null != (((object)this._systemVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._systemVersion.ToString()) : null, "systemVersion" ,container.Add ); + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._totalEcpuCount), "totalEcpuCount" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._scanDnsName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scanDnsName.ToString()) : null, "scanDnsName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._scanIPId) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __n in this._scanIPId ) + { + AddIf(null != (((object)__n)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__n.ToString()) : null ,__m.Add); + } + container.Add("scanIpIds",__m); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._scanDnsRecordId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scanDnsRecordId.ToString()) : null, "scanDnsRecordId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._vipId) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __i in this._vipId ) + { + AddIf(null != (((object)__i)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__i.ToString()) : null ,__h.Add); + } + container.Add("vipIds",__h); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._backupSubnetOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._backupSubnetOcid.ToString()) : null, "backupSubnetOcid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._subnetOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subnetOcid.ToString()) : null, "subnetOcid" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.PowerShell.cs new file mode 100644 index 000000000000..c16db168d2f3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Storage Details on the Exadata VM cluster. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterStorageDetailsTypeConverter))] + public partial class ExadbVMClusterStorageDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClusterStorageDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClusterStorageDetails(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClusterStorageDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)this).TotalSizeInGb = (int) content.GetValueForProperty("TotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)this).TotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClusterStorageDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)this).TotalSizeInGb = (int) content.GetValueForProperty("TotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal)this).TotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Storage Details on the Exadata VM cluster. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterStorageDetailsTypeConverter))] + public partial interface IExadbVMClusterStorageDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.TypeConverter.cs new file mode 100644 index 000000000000..0362007fb5d0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClusterStorageDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClusterStorageDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClusterStorageDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClusterStorageDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.cs new file mode 100644 index 000000000000..23d875b75344 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Storage Details on the Exadata VM cluster. + public partial class ExadbVMClusterStorageDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetailsInternal + { + + /// Backing field for property. + private int _totalSizeInGb; + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int TotalSizeInGb { get => this._totalSizeInGb; set => this._totalSizeInGb = value; } + + /// Creates an new instance. + public ExadbVMClusterStorageDetails() + { + + } + } + /// Storage Details on the Exadata VM cluster. + public partial interface IExadbVMClusterStorageDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int TotalSizeInGb { get; set; } + + } + /// Storage Details on the Exadata VM cluster. + internal partial interface IExadbVMClusterStorageDetailsInternal + + { + /// Total Capacity + int TotalSizeInGb { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.json.cs new file mode 100644 index 000000000000..9bbfd66fb544 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterStorageDetails.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Storage Details on the Exadata VM cluster. + public partial class ExadbVMClusterStorageDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClusterStorageDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_totalSizeInGb = If( json?.PropertyT("totalSizeInGbs"), out var __jsonTotalSizeInGbs) ? (int)__jsonTotalSizeInGbs : TotalSizeInGb;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterStorageDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClusterStorageDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._totalSizeInGb), "totalSizeInGbs" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.PowerShell.cs new file mode 100644 index 000000000000..9b83e99cf979 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The type used for update operations of the ExadbVmCluster. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterUpdateTypeConverter))] + public partial class ExadbVMClusterUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClusterUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClusterUpdate(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClusterUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClusterUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The type used for update operations of the ExadbVmCluster. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterUpdateTypeConverter))] + public partial interface IExadbVMClusterUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.TypeConverter.cs new file mode 100644 index 000000000000..e4ba25addd6f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClusterUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClusterUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClusterUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClusterUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.cs new file mode 100644 index 000000000000..52835acbcbd3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the ExadbVmCluster. + public partial class ExadbVMClusterUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal + { + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateProperties()); set { {_property = value;} } } + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? NodeCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdatePropertiesInternal)Property).NodeCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdatePropertiesInternal)Property).NodeCount = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateTags()); set => this._tag = value; } + + /// Backing field for property. + private string[] _zone; + + /// The availability zones. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public ExadbVMClusterUpdate() + { + + } + } + /// The type used for update operations of the ExadbVmCluster. + public partial interface IExadbVMClusterUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int? NodeCount { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags Tag { get; set; } + /// The availability zones. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability zones.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + string[] Zone { get; set; } + + } + /// The type used for update operations of the ExadbVmCluster. + internal partial interface IExadbVMClusterUpdateInternal + + { + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + int? NodeCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties Property { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags Tag { get; set; } + /// The availability zones. + string[] Zone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.json.cs new file mode 100644 index 000000000000..71afeeb260c1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdate.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the ExadbVmCluster. + public partial class ExadbVMClusterUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClusterUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateProperties.FromJson(__jsonProperties) : Property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Zone;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClusterUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..8fe132eda75d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The updatable properties of the ExadbVmCluster. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterUpdatePropertiesTypeConverter))] + public partial class ExadbVMClusterUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClusterUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClusterUpdateProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClusterUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdatePropertiesInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdatePropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClusterUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NodeCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdatePropertiesInternal)this).NodeCount = (int?) content.GetValueForProperty("NodeCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdatePropertiesInternal)this).NodeCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The updatable properties of the ExadbVmCluster. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterUpdatePropertiesTypeConverter))] + public partial interface IExadbVMClusterUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..745782d4ec01 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClusterUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClusterUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClusterUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClusterUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.cs new file mode 100644 index 000000000000..bc65ad236a9b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the ExadbVmCluster. + public partial class ExadbVMClusterUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdatePropertiesInternal + { + + /// Backing field for property. + private int? _nodeCount; + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? NodeCount { get => this._nodeCount; set => this._nodeCount = value; } + + /// Creates an new instance. + public ExadbVMClusterUpdateProperties() + { + + } + } + /// The updatable properties of the ExadbVmCluster. + public partial interface IExadbVMClusterUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + int? NodeCount { get; set; } + + } + /// The updatable properties of the ExadbVmCluster. + internal partial interface IExadbVMClusterUpdatePropertiesInternal + + { + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + int? NodeCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.json.cs new file mode 100644 index 000000000000..14b741f63d08 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the ExadbVmCluster. + public partial class ExadbVMClusterUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClusterUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_nodeCount = If( json?.PropertyT("nodeCount"), out var __jsonNodeCount) ? (int?)__jsonNodeCount : NodeCount;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClusterUpdateProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._nodeCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._nodeCount) : null, "nodeCount" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..7c95daac41cb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.PowerShell.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterUpdateTagsTypeConverter))] + public partial class ExadbVMClusterUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClusterUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClusterUpdateTags(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClusterUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClusterUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(ExadbVMClusterUpdateTagsTypeConverter))] + public partial interface IExadbVMClusterUpdateTags + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..e6c1d423edc6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClusterUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClusterUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClusterUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClusterUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.cs new file mode 100644 index 000000000000..821cec29986b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class ExadbVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTagsInternal + { + + /// Creates an new instance. + public ExadbVMClusterUpdateTags() + { + + } + } + /// Resource tags. + public partial interface IExadbVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IExadbVMClusterUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.dictionary.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.dictionary.cs new file mode 100644 index 000000000000..5e0893dd863d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExadbVMClusterUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.json.cs new file mode 100644 index 000000000000..4fc396872001 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExadbVMClusterUpdateTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class ExadbVMClusterUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + /// + internal ExadbVMClusterUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClusterUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.PowerShell.cs new file mode 100644 index 000000000000..574c3daca531 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.PowerShell.cs @@ -0,0 +1,330 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The DbNode resource belonging to ExadbVmCluster + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodeTypeConverter))] + public partial class ExascaleDbNode + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbNode(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbNode(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbNode(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TotalCpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TotalCpuCoreCount = (int?) content.GetValueForProperty("TotalCpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TotalCpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbNode(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TotalCpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TotalCpuCoreCount = (int?) content.GetValueForProperty("TotalCpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal)this).TotalCpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The DbNode resource belonging to ExadbVmCluster + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodeTypeConverter))] + public partial interface IExascaleDbNode + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.TypeConverter.cs new file mode 100644 index 000000000000..6f4cbe9ed506 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbNodeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbNode.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbNode.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbNode.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.cs new file mode 100644 index 000000000000..0b919b561704 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.cs @@ -0,0 +1,314 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The DbNode resource belonging to ExadbVmCluster + public partial class ExascaleDbNode : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string AdditionalDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).AdditionalDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).AdditionalDetail = value ?? null; } + + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? CpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).CpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).CpuCoreCount = value ?? default(int); } + + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DbNodeStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).DbNodeStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).DbNodeStorageSizeInGb = value ?? default(int); } + + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string FaultDomain { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).FaultDomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).FaultDomain = value ?? null; } + + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Hostname { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).Hostname; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).Hostname = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).LifecycleState = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState)""); } + + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string MaintenanceType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).MaintenanceType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).MaintenanceType = value ?? null; } + + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MemorySizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).MemorySizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).MemorySizeInGb = value ?? default(int); } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).Ocid = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeProperties()); set => this._property = value; } + + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? SoftwareStorageSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).SoftwareStorageSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).SoftwareStorageSizeInGb = value ?? default(int); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceWindowEnd { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).TimeMaintenanceWindowEnd; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).TimeMaintenanceWindowEnd = value ?? default(global::System.DateTime); } + + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeMaintenanceWindowStart { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).TimeMaintenanceWindowStart; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).TimeMaintenanceWindowStart = value ?? default(global::System.DateTime); } + + /// The total number of CPU cores reserved on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? TotalCpuCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).TotalCpuCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)Property).TotalCpuCoreCount = value ?? default(int); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ExascaleDbNode() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The DbNode resource belonging to ExadbVmCluster + public partial interface IExascaleDbNode : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the planned maintenance.", + SerializedName = @"additionalDetails", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; set; } + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the Db node.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated local node storage in GBs on the Db node.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the Fault Domain the instance is contained in.", + SerializedName = @"faultDomain", + PossibleTypes = new [] { typeof(string) })] + string FaultDomain { get; set; } + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name for the database node.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of the database node.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get; set; } + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of database node maintenance.", + SerializedName = @"maintenanceType", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated memory in GBs on the Db node.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DbNode OCID", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.", + SerializedName = @"softwareStorageSizeInGb", + PossibleTypes = new [] { typeof(int) })] + int? SoftwareStorageSizeInGb { get; set; } + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"End date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Start date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowStart", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The total number of CPU cores reserved on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The total number of CPU cores reserved on the Db node.", + SerializedName = @"totalCpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? TotalCpuCoreCount { get; set; } + + } + /// The DbNode resource belonging to ExadbVmCluster + internal partial interface IExascaleDbNodeInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// Additional information about the planned maintenance. + string AdditionalDetail { get; set; } + /// The number of CPU cores enabled on the Db node. + int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + int? DbNodeStorageSizeInGb { get; set; } + /// The name of the Fault Domain the instance is contained in. + string FaultDomain { get; set; } + /// The host name for the database node. + string Hostname { get; set; } + /// The current state of the database node. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get; set; } + /// The type of database node maintenance. + string MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + int? MemorySizeInGb { get; set; } + /// DbNode OCID + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties Property { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + int? SoftwareStorageSizeInGb { get; set; } + /// End date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The total number of CPU cores reserved on the Db node. + int? TotalCpuCoreCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.json.cs new file mode 100644 index 000000000000..adfb76dffe16 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNode.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The DbNode resource belonging to ExadbVmCluster + public partial class ExascaleDbNode + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbNode(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbNode(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.PowerShell.cs new file mode 100644 index 000000000000..2e17d58e989d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a ExascaleDbNode list operation. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodeListResultTypeConverter))] + public partial class ExascaleDbNodeListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbNodeListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbNodeListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbNodeListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbNodeListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a ExascaleDbNode list operation. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodeListResultTypeConverter))] + public partial interface IExascaleDbNodeListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.TypeConverter.cs new file mode 100644 index 000000000000..615a07901bb9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbNodeListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbNodeListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbNodeListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbNodeListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.cs new file mode 100644 index 000000000000..449a84e06229 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a ExascaleDbNode list operation. + public partial class ExascaleDbNodeListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode[] _value; + + /// The ExascaleDbNode items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ExascaleDbNodeListResult() + { + + } + } + /// The response of a ExascaleDbNode list operation. + public partial interface IExascaleDbNodeListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The ExascaleDbNode items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ExascaleDbNode items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode[] Value { get; set; } + + } + /// The response of a ExascaleDbNode list operation. + internal partial interface IExascaleDbNodeListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The ExascaleDbNode items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.json.cs new file mode 100644 index 000000000000..720591bae94e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a ExascaleDbNode list operation. + public partial class ExascaleDbNodeListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbNodeListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNode.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbNodeListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.PowerShell.cs new file mode 100644 index 000000000000..368e87ad2549 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.PowerShell.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The properties of DbNodeResource + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodePropertiesTypeConverter))] + public partial class ExascaleDbNodeProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbNodeProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbNodeProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbNodeProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TotalCpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TotalCpuCoreCount = (int?) content.GetValueForProperty("TotalCpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TotalCpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbNodeProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("AdditionalDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).AdditionalDetail = (string) content.GetValueForProperty("AdditionalDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).AdditionalDetail, global::System.Convert.ToString); + } + if (content.Contains("CpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).CpuCoreCount = (int?) content.GetValueForProperty("CpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).CpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DbNodeStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).DbNodeStorageSizeInGb = (int?) content.GetValueForProperty("DbNodeStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).DbNodeStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FaultDomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).FaultDomain = (string) content.GetValueForProperty("FaultDomain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).FaultDomain, global::System.Convert.ToString); + } + if (content.Contains("Hostname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Hostname = (string) content.GetValueForProperty("Hostname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).Hostname, global::System.Convert.ToString); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState.CreateFrom); + } + if (content.Contains("MaintenanceType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MaintenanceType = (string) content.GetValueForProperty("MaintenanceType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MaintenanceType, global::System.Convert.ToString); + } + if (content.Contains("MemorySizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MemorySizeInGb = (int?) content.GetValueForProperty("MemorySizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).MemorySizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SoftwareStorageSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).SoftwareStorageSizeInGb = (int?) content.GetValueForProperty("SoftwareStorageSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).SoftwareStorageSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TimeMaintenanceWindowEnd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowEnd",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowEnd, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TimeMaintenanceWindowStart")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowStart = (global::System.DateTime?) content.GetValueForProperty("TimeMaintenanceWindowStart",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TimeMaintenanceWindowStart, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("TotalCpuCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TotalCpuCoreCount = (int?) content.GetValueForProperty("TotalCpuCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal)this).TotalCpuCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The properties of DbNodeResource + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodePropertiesTypeConverter))] + public partial interface IExascaleDbNodeProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.TypeConverter.cs new file mode 100644 index 000000000000..225f1d2ce494 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbNodePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbNodeProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbNodeProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbNodeProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.cs new file mode 100644 index 000000000000..fad875aac0a3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The properties of DbNodeResource + public partial class ExascaleDbNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodePropertiesInternal + { + + /// Backing field for property. + private string _additionalDetail; + + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AdditionalDetail { get => this._additionalDetail; set => this._additionalDetail = value; } + + /// Backing field for property. + private int? _cpuCoreCount; + + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CpuCoreCount { get => this._cpuCoreCount; set => this._cpuCoreCount = value; } + + /// Backing field for property. + private int? _dbNodeStorageSizeInGb; + + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? DbNodeStorageSizeInGb { get => this._dbNodeStorageSizeInGb; set => this._dbNodeStorageSizeInGb = value; } + + /// Backing field for property. + private string _faultDomain; + + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string FaultDomain { get => this._faultDomain; set => this._faultDomain = value; } + + /// Backing field for property. + private string _hostname; + + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Hostname { get => this._hostname; set => this._hostname = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? _lifecycleState; + + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get => this._lifecycleState; set => this._lifecycleState = value; } + + /// Backing field for property. + private string _maintenanceType; + + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string MaintenanceType { get => this._maintenanceType; set => this._maintenanceType = value; } + + /// Backing field for property. + private int? _memorySizeInGb; + + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MemorySizeInGb { get => this._memorySizeInGb; set => this._memorySizeInGb = value; } + + /// Backing field for property. + private string _ocid; + + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// Backing field for property. + private int? _softwareStorageSizeInGb; + + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? SoftwareStorageSizeInGb { get => this._softwareStorageSizeInGb; set => this._softwareStorageSizeInGb = value; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceWindowEnd; + + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceWindowEnd { get => this._timeMaintenanceWindowEnd; set => this._timeMaintenanceWindowEnd = value; } + + /// Backing field for property. + private global::System.DateTime? _timeMaintenanceWindowStart; + + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeMaintenanceWindowStart { get => this._timeMaintenanceWindowStart; set => this._timeMaintenanceWindowStart = value; } + + /// Backing field for property. + private int? _totalCpuCoreCount; + + /// The total number of CPU cores reserved on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? TotalCpuCoreCount { get => this._totalCpuCoreCount; set => this._totalCpuCoreCount = value; } + + /// Creates an new instance. + public ExascaleDbNodeProperties() + { + + } + } + /// The properties of DbNodeResource + public partial interface IExascaleDbNodeProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Additional information about the planned maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Additional information about the planned maintenance.", + SerializedName = @"additionalDetails", + PossibleTypes = new [] { typeof(string) })] + string AdditionalDetail { get; set; } + /// The number of CPU cores enabled on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the Db node.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated local node storage in GBs on the Db node.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? DbNodeStorageSizeInGb { get; set; } + /// The name of the Fault Domain the instance is contained in. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the Fault Domain the instance is contained in.", + SerializedName = @"faultDomain", + PossibleTypes = new [] { typeof(string) })] + string FaultDomain { get; set; } + /// The host name for the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The host name for the database node.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + string Hostname { get; set; } + /// The current state of the database node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The current state of the database node.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get; set; } + /// The type of database node maintenance. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of database node maintenance.", + SerializedName = @"maintenanceType", + PossibleTypes = new [] { typeof(string) })] + string MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The allocated memory in GBs on the Db node.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? MemorySizeInGb { get; set; } + /// DbNode OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine DB systems.", + SerializedName = @"softwareStorageSizeInGb", + PossibleTypes = new [] { typeof(int) })] + int? SoftwareStorageSizeInGb { get; set; } + /// End date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"End date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowEnd", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Start date and time of maintenance window.", + SerializedName = @"timeMaintenanceWindowStart", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The total number of CPU cores reserved on the Db node. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The total number of CPU cores reserved on the Db node.", + SerializedName = @"totalCpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? TotalCpuCoreCount { get; set; } + + } + /// The properties of DbNodeResource + internal partial interface IExascaleDbNodePropertiesInternal + + { + /// Additional information about the planned maintenance. + string AdditionalDetail { get; set; } + /// The number of CPU cores enabled on the Db node. + int? CpuCoreCount { get; set; } + /// The allocated local node storage in GBs on the Db node. + int? DbNodeStorageSizeInGb { get; set; } + /// The name of the Fault Domain the instance is contained in. + string FaultDomain { get; set; } + /// The host name for the database node. + string Hostname { get; set; } + /// The current state of the database node. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState? LifecycleState { get; set; } + /// The type of database node maintenance. + string MaintenanceType { get; set; } + /// The allocated memory in GBs on the Db node. + int? MemorySizeInGb { get; set; } + /// DbNode OCID + string Ocid { get; set; } + /// + /// The size (in GB) of the block storage volume allocation for the DB system. This attribute applies only for virtual machine + /// DB systems. + /// + int? SoftwareStorageSizeInGb { get; set; } + /// End date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowEnd { get; set; } + /// Start date and time of maintenance window. + global::System.DateTime? TimeMaintenanceWindowStart { get; set; } + /// The total number of CPU cores reserved on the Db node. + int? TotalCpuCoreCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.json.cs new file mode 100644 index 000000000000..7fe2f5754337 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbNodeProperties.json.cs @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The properties of DbNodeResource + public partial class ExascaleDbNodeProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbNodeProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_additionalDetail = If( json?.PropertyT("additionalDetails"), out var __jsonAdditionalDetails) ? (string)__jsonAdditionalDetails : (string)AdditionalDetail;} + {_cpuCoreCount = If( json?.PropertyT("cpuCoreCount"), out var __jsonCpuCoreCount) ? (int?)__jsonCpuCoreCount : CpuCoreCount;} + {_dbNodeStorageSizeInGb = If( json?.PropertyT("dbNodeStorageSizeInGbs"), out var __jsonDbNodeStorageSizeInGbs) ? (int?)__jsonDbNodeStorageSizeInGbs : DbNodeStorageSizeInGb;} + {_faultDomain = If( json?.PropertyT("faultDomain"), out var __jsonFaultDomain) ? (string)__jsonFaultDomain : (string)FaultDomain;} + {_hostname = If( json?.PropertyT("hostname"), out var __jsonHostname) ? (string)__jsonHostname : (string)Hostname;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_maintenanceType = If( json?.PropertyT("maintenanceType"), out var __jsonMaintenanceType) ? (string)__jsonMaintenanceType : (string)MaintenanceType;} + {_memorySizeInGb = If( json?.PropertyT("memorySizeInGbs"), out var __jsonMemorySizeInGbs) ? (int?)__jsonMemorySizeInGbs : MemorySizeInGb;} + {_softwareStorageSizeInGb = If( json?.PropertyT("softwareStorageSizeInGb"), out var __jsonSoftwareStorageSizeInGb) ? (int?)__jsonSoftwareStorageSizeInGb : SoftwareStorageSizeInGb;} + {_timeMaintenanceWindowEnd = If( json?.PropertyT("timeMaintenanceWindowEnd"), out var __jsonTimeMaintenanceWindowEnd) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceWindowEnd, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceWindowEndValue) ? __jsonTimeMaintenanceWindowEndValue : TimeMaintenanceWindowEnd : TimeMaintenanceWindowEnd;} + {_timeMaintenanceWindowStart = If( json?.PropertyT("timeMaintenanceWindowStart"), out var __jsonTimeMaintenanceWindowStart) ? global::System.DateTime.TryParse((string)__jsonTimeMaintenanceWindowStart, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeMaintenanceWindowStartValue) ? __jsonTimeMaintenanceWindowStartValue : TimeMaintenanceWindowStart : TimeMaintenanceWindowStart;} + {_totalCpuCoreCount = If( json?.PropertyT("totalCpuCoreCount"), out var __jsonTotalCpuCoreCount) ? (int?)__jsonTotalCpuCoreCount : TotalCpuCoreCount;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbNodeProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + AddIf( null != (((object)this._additionalDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._additionalDetail.ToString()) : null, "additionalDetails" ,container.Add ); + AddIf( null != this._cpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._cpuCoreCount) : null, "cpuCoreCount" ,container.Add ); + AddIf( null != this._dbNodeStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._dbNodeStorageSizeInGb) : null, "dbNodeStorageSizeInGbs" ,container.Add ); + AddIf( null != (((object)this._faultDomain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._faultDomain.ToString()) : null, "faultDomain" ,container.Add ); + AddIf( null != (((object)this._hostname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hostname.ToString()) : null, "hostname" ,container.Add ); + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + AddIf( null != (((object)this._maintenanceType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._maintenanceType.ToString()) : null, "maintenanceType" ,container.Add ); + AddIf( null != this._memorySizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._memorySizeInGb) : null, "memorySizeInGbs" ,container.Add ); + AddIf( null != this._softwareStorageSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._softwareStorageSizeInGb) : null, "softwareStorageSizeInGb" ,container.Add ); + AddIf( null != this._timeMaintenanceWindowEnd ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeMaintenanceWindowEnd?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceWindowEnd" ,container.Add ); + AddIf( null != this._timeMaintenanceWindowStart ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeMaintenanceWindowStart?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeMaintenanceWindowStart" ,container.Add ); + AddIf( null != this._totalCpuCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._totalCpuCoreCount) : null, "totalCpuCoreCount" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.PowerShell.cs new file mode 100644 index 000000000000..28d006ca8fcd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Exadata Database Storage Details + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageDetailsTypeConverter))] + public partial class ExascaleDbStorageDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageDetails(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AvailableSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).AvailableSizeInGb = (int?) content.GetValueForProperty("AvailableSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).AvailableSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).TotalSizeInGb = (int?) content.GetValueForProperty("TotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).TotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("AvailableSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).AvailableSizeInGb = (int?) content.GetValueForProperty("AvailableSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).AvailableSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).TotalSizeInGb = (int?) content.GetValueForProperty("TotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)this).TotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Exadata Database Storage Details + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageDetailsTypeConverter))] + public partial interface IExascaleDbStorageDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.TypeConverter.cs new file mode 100644 index 000000000000..6bccbaf167e6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.cs new file mode 100644 index 000000000000..98d192028923 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Exadata Database Storage Details + public partial class ExascaleDbStorageDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal + { + + /// Backing field for property. + private int? _availableSizeInGb; + + /// Available Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableSizeInGb { get => this._availableSizeInGb; set => this._availableSizeInGb = value; } + + /// Backing field for property. + private int? _totalSizeInGb; + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? TotalSizeInGb { get => this._totalSizeInGb; set => this._totalSizeInGb = value; } + + /// Creates an new instance. + public ExascaleDbStorageDetails() + { + + } + } + /// Exadata Database Storage Details + public partial interface IExascaleDbStorageDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Available Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Available Capacity", + SerializedName = @"availableSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableSizeInGb { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? TotalSizeInGb { get; set; } + + } + /// Exadata Database Storage Details + internal partial interface IExascaleDbStorageDetailsInternal + + { + /// Available Capacity + int? AvailableSizeInGb { get; set; } + /// Total Capacity + int? TotalSizeInGb { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.json.cs new file mode 100644 index 000000000000..2528a187e808 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageDetails.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Exadata Database Storage Details + public partial class ExascaleDbStorageDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_availableSizeInGb = If( json?.PropertyT("availableSizeInGbs"), out var __jsonAvailableSizeInGbs) ? (int?)__jsonAvailableSizeInGbs : AvailableSizeInGb;} + {_totalSizeInGb = If( json?.PropertyT("totalSizeInGbs"), out var __jsonTotalSizeInGbs) ? (int?)__jsonTotalSizeInGbs : TotalSizeInGb;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._availableSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableSizeInGb) : null, "availableSizeInGbs" ,container.Add ); + AddIf( null != this._totalSizeInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._totalSizeInGb) : null, "totalSizeInGbs" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.PowerShell.cs new file mode 100644 index 000000000000..602830784521 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Create exadata Database Storage Details model + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageInputDetailsTypeConverter))] + public partial class ExascaleDbStorageInputDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageInputDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageInputDetails(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageInputDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetailsInternal)this).TotalSizeInGb = (int) content.GetValueForProperty("TotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetailsInternal)this).TotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageInputDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetailsInternal)this).TotalSizeInGb = (int) content.GetValueForProperty("TotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetailsInternal)this).TotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Create exadata Database Storage Details model + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageInputDetailsTypeConverter))] + public partial interface IExascaleDbStorageInputDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.TypeConverter.cs new file mode 100644 index 000000000000..4ccf6c077cc6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageInputDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageInputDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageInputDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageInputDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.cs new file mode 100644 index 000000000000..bc4ee7c90da3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Create exadata Database Storage Details model + public partial class ExascaleDbStorageInputDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetailsInternal + { + + /// Backing field for property. + private int _totalSizeInGb; + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int TotalSizeInGb { get => this._totalSizeInGb; set => this._totalSizeInGb = value; } + + /// Creates an new instance. + public ExascaleDbStorageInputDetails() + { + + } + } + /// Create exadata Database Storage Details model + public partial interface IExascaleDbStorageInputDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int TotalSizeInGb { get; set; } + + } + /// Create exadata Database Storage Details model + internal partial interface IExascaleDbStorageInputDetailsInternal + + { + /// Total Capacity + int TotalSizeInGb { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.json.cs new file mode 100644 index 000000000000..e4c884d18b5f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageInputDetails.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Create exadata Database Storage Details model + public partial class ExascaleDbStorageInputDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageInputDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_totalSizeInGb = If( json?.PropertyT("totalSizeInGbs"), out var __jsonTotalSizeInGbs) ? (int)__jsonTotalSizeInGbs : TotalSizeInGb;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageInputDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._totalSizeInGb), "totalSizeInGbs" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.PowerShell.cs new file mode 100644 index 000000000000..8ce65b0f3d32 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.PowerShell.cs @@ -0,0 +1,386 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// ExascaleDbStorageVault resource definition + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultTypeConverter))] + public partial class ExascaleDbStorageVault + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageVault(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageVault(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageVault(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("HighCapacityDatabaseStorageInput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInput = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails) content.GetValueForProperty("HighCapacityDatabaseStorageInput",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInput, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("HighCapacityDatabaseStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails) content.GetValueForProperty("HighCapacityDatabaseStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdditionalFlashCacheInPercent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AdditionalFlashCacheInPercent = (int?) content.GetValueForProperty("AdditionalFlashCacheInPercent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AdditionalFlashCacheInPercent, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("VMClusterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).VMClusterCount = (int?) content.GetValueForProperty("VMClusterCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).VMClusterCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("HighCapacityDatabaseStorageInputTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb = (int) content.GetValueForProperty("HighCapacityDatabaseStorageInputTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageAvailableSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageAvailableSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageTotalSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageVault(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Zone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Zone = (string[]) content.GetValueForProperty("Zone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Zone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("HighCapacityDatabaseStorageInput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInput = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails) content.GetValueForProperty("HighCapacityDatabaseStorageInput",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInput, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("HighCapacityDatabaseStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails) content.GetValueForProperty("HighCapacityDatabaseStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdditionalFlashCacheInPercent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AdditionalFlashCacheInPercent = (int?) content.GetValueForProperty("AdditionalFlashCacheInPercent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AdditionalFlashCacheInPercent, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("VMClusterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).VMClusterCount = (int?) content.GetValueForProperty("VMClusterCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).VMClusterCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("HighCapacityDatabaseStorageInputTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb = (int) content.GetValueForProperty("HighCapacityDatabaseStorageInputTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageAvailableSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageAvailableSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageTotalSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).HighCapacityDatabaseStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// ExascaleDbStorageVault resource definition + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultTypeConverter))] + public partial interface IExascaleDbStorageVault + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.TypeConverter.cs new file mode 100644 index 000000000000..04545f621224 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageVaultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageVault.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageVault.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageVault.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.cs new file mode 100644 index 000000000000..7218e06c9b6a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExascaleDbStorageVault resource definition + public partial class ExascaleDbStorageVault : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(); + + /// + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AdditionalFlashCacheInPercent { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).AdditionalFlashCacheInPercent; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).AdditionalFlashCacheInPercent = value ?? default(int); } + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Exadata Database Storage Vault description. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Description { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).Description = value ?? null; } + + /// + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).DisplayName; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).DisplayName = value ?? null; } + + /// Available Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? HighCapacityDatabaseStorageAvailableSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageAvailableSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageAvailableSizeInGb = value ?? default(int); } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? HighCapacityDatabaseStorageInputTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageInputTotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageInputTotalSizeInGb = value ?? default(int); } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? HighCapacityDatabaseStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageTotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageTotalSizeInGb = value ?? default(int); } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; } + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).LifecycleDetail; } + + /// Exadata Database Storage Vault lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).LifecycleState; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for HighCapacityDatabaseStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.HighCapacityDatabaseStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorage = value; } + + /// Internal Acessors for HighCapacityDatabaseStorageInput + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.HighCapacityDatabaseStorageInput { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageInput; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).HighCapacityDatabaseStorageInput = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).OciUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).OciUrl = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for VMClusterCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal.VMClusterCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).VMClusterCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).VMClusterCount = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Name; } + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string OciUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).OciUrl; } + + /// The OCID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultProperties()); set => this._property = value; } + + /// Exadata Database Storage Vault provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).ProvisioningState; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// The time zone that you want to use for the Exadata Database Storage Vault + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TimeZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).TimeZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).TimeZone = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__trackedResource).Type; } + + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? VMClusterCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)Property).VMClusterCount; } + + /// Backing field for property. + private string[] _zone; + + /// The availability zones. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] Zone { get => this._zone; set => this._zone = value; } + + /// Creates an new instance. + public ExascaleDbStorageVault() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// ExascaleDbStorageVault resource definition + public partial interface IExascaleDbStorageVault : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource + { + /// + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size of additional Flash Cache in percentage of High Capacity database storage.", + SerializedName = @"additionalFlashCacheInPercent", + PossibleTypes = new [] { typeof(int) })] + int? AdditionalFlashCacheInPercent { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// Exadata Database Storage Vault description. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Exadata Database Storage Vault description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Available Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Available Capacity", + SerializedName = @"availableSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? HighCapacityDatabaseStorageAvailableSizeInGb { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? HighCapacityDatabaseStorageInputTotalSizeInGb { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? HighCapacityDatabaseStorageTotalSizeInGb { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// Exadata Database Storage Vault lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata Database Storage Vault lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? LifecycleState { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// The OCID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Exadata Database Storage Vault.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Exadata Database Storage Vault provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata Database Storage Vault provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// The time zone that you want to use for the Exadata Database Storage Vault + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone that you want to use for the Exadata Database Storage Vault", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of Exadata VM clusters used the Exadata Database Storage Vault.", + SerializedName = @"vmClusterCount", + PossibleTypes = new [] { typeof(int) })] + int? VMClusterCount { get; } + /// The availability zones. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability zones.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + string[] Zone { get; set; } + + } + /// ExascaleDbStorageVault resource definition + internal partial interface IExascaleDbStorageVaultInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal + { + /// + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// + int? AdditionalFlashCacheInPercent { get; set; } + + string AzureAsyncOperation { get; set; } + /// Exadata Database Storage Vault description. + string Description { get; set; } + /// + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// + string DisplayName { get; set; } + /// Response exadata Database Storage Details + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails HighCapacityDatabaseStorage { get; set; } + /// Available Capacity + int? HighCapacityDatabaseStorageAvailableSizeInGb { get; set; } + /// Create exadata Database Storage Details + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails HighCapacityDatabaseStorageInput { get; set; } + /// Total Capacity + int? HighCapacityDatabaseStorageInputTotalSizeInGb { get; set; } + /// Total Capacity + int? HighCapacityDatabaseStorageTotalSizeInGb { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// Exadata Database Storage Vault lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? LifecycleState { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// The OCID of the Exadata Database Storage Vault. + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties Property { get; set; } + /// Exadata Database Storage Vault provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + + int? RetryAfter { get; set; } + /// The time zone that you want to use for the Exadata Database Storage Vault + string TimeZone { get; set; } + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + int? VMClusterCount { get; set; } + /// The availability zones. + string[] Zone { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.json.cs new file mode 100644 index 000000000000..fd2c23f0d200 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVault.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExascaleDbStorageVault resource definition + public partial class ExascaleDbStorageVault + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageVault(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultProperties.FromJson(__jsonProperties) : Property;} + {_zone = If( json?.PropertyT("zones"), out var __jsonZones) ? If( __jsonZones as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : Zone;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageVault(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __trackedResource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + if (null != this._zone) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._zone ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("zones",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.PowerShell.cs new file mode 100644 index 000000000000..aeb51f8f87c7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a ExascaleDbStorageVault list operation. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultListResultTypeConverter))] + public partial class ExascaleDbStorageVaultListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageVaultListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageVaultListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageVaultListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageVaultListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a ExascaleDbStorageVault list operation. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultListResultTypeConverter))] + public partial interface IExascaleDbStorageVaultListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.TypeConverter.cs new file mode 100644 index 000000000000..dcd435caac97 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageVaultListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageVaultListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.cs new file mode 100644 index 000000000000..cc428f2d2294 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a ExascaleDbStorageVault list operation. + public partial class ExascaleDbStorageVaultListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault[] _value; + + /// The ExascaleDbStorageVault items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ExascaleDbStorageVaultListResult() + { + + } + } + /// The response of a ExascaleDbStorageVault list operation. + public partial interface IExascaleDbStorageVaultListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The ExascaleDbStorageVault items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ExascaleDbStorageVault items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault[] Value { get; set; } + + } + /// The response of a ExascaleDbStorageVault list operation. + internal partial interface IExascaleDbStorageVaultListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The ExascaleDbStorageVault items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.json.cs new file mode 100644 index 000000000000..3790fc26a26a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a ExascaleDbStorageVault list operation. + public partial class ExascaleDbStorageVaultListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageVaultListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVault.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageVaultListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.PowerShell.cs new file mode 100644 index 000000000000..8cae6fe88f15 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.PowerShell.cs @@ -0,0 +1,258 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// ExascaleDbStorageVault resource model + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultPropertiesTypeConverter))] + public partial class ExascaleDbStorageVaultProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageVaultProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageVaultProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageVaultProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HighCapacityDatabaseStorageInput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInput = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails) content.GetValueForProperty("HighCapacityDatabaseStorageInput",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInput, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("HighCapacityDatabaseStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails) content.GetValueForProperty("HighCapacityDatabaseStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdditionalFlashCacheInPercent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).AdditionalFlashCacheInPercent = (int?) content.GetValueForProperty("AdditionalFlashCacheInPercent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).AdditionalFlashCacheInPercent, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("VMClusterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).VMClusterCount = (int?) content.GetValueForProperty("VMClusterCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).VMClusterCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("HighCapacityDatabaseStorageInputTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb = (int) content.GetValueForProperty("HighCapacityDatabaseStorageInputTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageAvailableSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageAvailableSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageTotalSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageVaultProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HighCapacityDatabaseStorageInput")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInput = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails) content.GetValueForProperty("HighCapacityDatabaseStorageInput",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInput, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("HighCapacityDatabaseStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorage = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails) content.GetValueForProperty("HighCapacityDatabaseStorage",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorage, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetailsTypeConverter.ConvertFrom); + } + if (content.Contains("AdditionalFlashCacheInPercent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).AdditionalFlashCacheInPercent = (int?) content.GetValueForProperty("AdditionalFlashCacheInPercent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).AdditionalFlashCacheInPercent, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Description, global::System.Convert.ToString); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("TimeZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).TimeZone = (string) content.GetValueForProperty("TimeZone",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).TimeZone, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState.CreateFrom); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("VMClusterCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).VMClusterCount = (int?) content.GetValueForProperty("VMClusterCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).VMClusterCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("OciUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).OciUrl = (string) content.GetValueForProperty("OciUrl",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).OciUrl, global::System.Convert.ToString); + } + if (content.Contains("HighCapacityDatabaseStorageInputTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb = (int) content.GetValueForProperty("HighCapacityDatabaseStorageInputTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageInputTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageAvailableSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageAvailableSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageAvailableSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("HighCapacityDatabaseStorageTotalSizeInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageTotalSizeInGb = (int?) content.GetValueForProperty("HighCapacityDatabaseStorageTotalSizeInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal)this).HighCapacityDatabaseStorageTotalSizeInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// ExascaleDbStorageVault resource model + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultPropertiesTypeConverter))] + public partial interface IExascaleDbStorageVaultProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.TypeConverter.cs new file mode 100644 index 000000000000..ed7345877df8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageVaultPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageVaultProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.cs new file mode 100644 index 000000000000..faff53e4379b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.cs @@ -0,0 +1,300 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExascaleDbStorageVault resource model + public partial class ExascaleDbStorageVaultProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal + { + + /// Backing field for property. + private int? _additionalFlashCacheInPercent; + + /// + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AdditionalFlashCacheInPercent { get => this._additionalFlashCacheInPercent; set => this._additionalFlashCacheInPercent = value; } + + /// Backing field for property. + private string _description; + + /// Exadata Database Storage Vault description. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _displayName; + + /// + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails _highCapacityDatabaseStorage; + + /// Response exadata Database Storage Details + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails HighCapacityDatabaseStorage { get => (this._highCapacityDatabaseStorage = this._highCapacityDatabaseStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetails()); } + + /// Available Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? HighCapacityDatabaseStorageAvailableSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)HighCapacityDatabaseStorage).AvailableSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)HighCapacityDatabaseStorage).AvailableSizeInGb = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails _highCapacityDatabaseStorageInput; + + /// Create exadata Database Storage Details + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails HighCapacityDatabaseStorageInput { get => (this._highCapacityDatabaseStorageInput = this._highCapacityDatabaseStorageInput ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetails()); set => this._highCapacityDatabaseStorageInput = value; } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int HighCapacityDatabaseStorageInputTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetailsInternal)HighCapacityDatabaseStorageInput).TotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetailsInternal)HighCapacityDatabaseStorageInput).TotalSizeInGb = value ; } + + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? HighCapacityDatabaseStorageTotalSizeInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)HighCapacityDatabaseStorage).TotalSizeInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetailsInternal)HighCapacityDatabaseStorage).TotalSizeInGb = value ?? default(int); } + + /// Backing field for property. + private string _lifecycleDetail; + + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? _lifecycleState; + + /// Exadata Database Storage Vault lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? LifecycleState { get => this._lifecycleState; } + + /// Internal Acessors for HighCapacityDatabaseStorage + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.HighCapacityDatabaseStorage { get => (this._highCapacityDatabaseStorage = this._highCapacityDatabaseStorage ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetails()); set { {_highCapacityDatabaseStorage = value;} } } + + /// Internal Acessors for HighCapacityDatabaseStorageInput + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.HighCapacityDatabaseStorageInput { get => (this._highCapacityDatabaseStorageInput = this._highCapacityDatabaseStorageInput ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetails()); set { {_highCapacityDatabaseStorageInput = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for OciUrl + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.OciUrl { get => this._ociUrl; set { {_ociUrl = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for VMClusterCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultPropertiesInternal.VMClusterCount { get => this._vMClusterCount; set { {_vMClusterCount = value;} } } + + /// Backing field for property. + private string _ociUrl; + + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OciUrl { get => this._ociUrl; } + + /// Backing field for property. + private string _ocid; + + /// The OCID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// Exadata Database Storage Vault provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _timeZone; + + /// The time zone that you want to use for the Exadata Database Storage Vault + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TimeZone { get => this._timeZone; set => this._timeZone = value; } + + /// Backing field for property. + private int? _vMClusterCount; + + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? VMClusterCount { get => this._vMClusterCount; } + + /// Creates an new instance. + public ExascaleDbStorageVaultProperties() + { + + } + } + /// ExascaleDbStorageVault resource model + public partial interface IExascaleDbStorageVaultProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size of additional Flash Cache in percentage of High Capacity database storage.", + SerializedName = @"additionalFlashCacheInPercent", + PossibleTypes = new [] { typeof(int) })] + int? AdditionalFlashCacheInPercent { get; set; } + /// Exadata Database Storage Vault description. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Exadata Database Storage Vault description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Available Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Available Capacity", + SerializedName = @"availableSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? HighCapacityDatabaseStorageAvailableSizeInGb { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int HighCapacityDatabaseStorageInputTotalSizeInGb { get; set; } + /// Total Capacity + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + int? HighCapacityDatabaseStorageTotalSizeInGb { get; set; } + /// Additional information about the current lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// Exadata Database Storage Vault lifecycle state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata Database Storage Vault lifecycle state", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? LifecycleState { get; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"HTTPS link to OCI resources exposed to Azure Customer via Azure Interface.", + SerializedName = @"ociUrl", + PossibleTypes = new [] { typeof(string) })] + string OciUrl { get; } + /// The OCID of the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OCID of the Exadata Database Storage Vault.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Exadata Database Storage Vault provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Exadata Database Storage Vault provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// The time zone that you want to use for the Exadata Database Storage Vault + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone that you want to use for the Exadata Database Storage Vault", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + string TimeZone { get; set; } + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The number of Exadata VM clusters used the Exadata Database Storage Vault.", + SerializedName = @"vmClusterCount", + PossibleTypes = new [] { typeof(int) })] + int? VMClusterCount { get; } + + } + /// ExascaleDbStorageVault resource model + internal partial interface IExascaleDbStorageVaultPropertiesInternal + + { + /// + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// + int? AdditionalFlashCacheInPercent { get; set; } + /// Exadata Database Storage Vault description. + string Description { get; set; } + /// + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// + string DisplayName { get; set; } + /// Response exadata Database Storage Details + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageDetails HighCapacityDatabaseStorage { get; set; } + /// Available Capacity + int? HighCapacityDatabaseStorageAvailableSizeInGb { get; set; } + /// Create exadata Database Storage Details + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageInputDetails HighCapacityDatabaseStorageInput { get; set; } + /// Total Capacity + int HighCapacityDatabaseStorageInputTotalSizeInGb { get; set; } + /// Total Capacity + int? HighCapacityDatabaseStorageTotalSizeInGb { get; set; } + /// Additional information about the current lifecycle state. + string LifecycleDetail { get; set; } + /// Exadata Database Storage Vault lifecycle state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState? LifecycleState { get; set; } + /// HTTPS link to OCI resources exposed to Azure Customer via Azure Interface. + string OciUrl { get; set; } + /// The OCID of the Exadata Database Storage Vault. + string Ocid { get; set; } + /// Exadata Database Storage Vault provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// The time zone that you want to use for the Exadata Database Storage Vault + string TimeZone { get; set; } + /// The number of Exadata VM clusters used the Exadata Database Storage Vault. + int? VMClusterCount { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.json.cs new file mode 100644 index 000000000000..2ba431a293a1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultProperties.json.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ExascaleDbStorageVault resource model + public partial class ExascaleDbStorageVaultProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageVaultProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_highCapacityDatabaseStorageInput = If( json?.PropertyT("highCapacityDatabaseStorageInput"), out var __jsonHighCapacityDatabaseStorageInput) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageInputDetails.FromJson(__jsonHighCapacityDatabaseStorageInput) : HighCapacityDatabaseStorageInput;} + {_highCapacityDatabaseStorage = If( json?.PropertyT("highCapacityDatabaseStorage"), out var __jsonHighCapacityDatabaseStorage) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageDetails.FromJson(__jsonHighCapacityDatabaseStorage) : HighCapacityDatabaseStorage;} + {_additionalFlashCacheInPercent = If( json?.PropertyT("additionalFlashCacheInPercent"), out var __jsonAdditionalFlashCacheInPercent) ? (int?)__jsonAdditionalFlashCacheInPercent : AdditionalFlashCacheInPercent;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_timeZone = If( json?.PropertyT("timeZone"), out var __jsonTimeZone) ? (string)__jsonTimeZone : (string)TimeZone;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_vMClusterCount = If( json?.PropertyT("vmClusterCount"), out var __jsonVMClusterCount) ? (int?)__jsonVMClusterCount : VMClusterCount;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_ociUrl = If( json?.PropertyT("ociUrl"), out var __jsonOciUrl) ? (string)__jsonOciUrl : (string)OciUrl;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageVaultProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._highCapacityDatabaseStorageInput ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._highCapacityDatabaseStorageInput.ToJson(null,serializationMode) : null, "highCapacityDatabaseStorageInput" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._highCapacityDatabaseStorage ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._highCapacityDatabaseStorage.ToJson(null,serializationMode) : null, "highCapacityDatabaseStorage" ,container.Add ); + } + AddIf( null != this._additionalFlashCacheInPercent ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._additionalFlashCacheInPercent) : null, "additionalFlashCacheInPercent" ,container.Add ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._timeZone)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeZone.ToString()) : null, "timeZone" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._vMClusterCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._vMClusterCount) : null, "vmClusterCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ociUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ociUrl.ToString()) : null, "ociUrl" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.PowerShell.cs new file mode 100644 index 000000000000..f6d354102120 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The type used for updating tags in ExascaleDbStorageVault resources. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultTagsUpdateTypeConverter))] + public partial class ExascaleDbStorageVaultTagsUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageVaultTagsUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageVaultTagsUpdate(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageVaultTagsUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdateTagsTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageVaultTagsUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdateTagsTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The type used for updating tags in ExascaleDbStorageVault resources. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultTagsUpdateTypeConverter))] + public partial interface IExascaleDbStorageVaultTagsUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.TypeConverter.cs new file mode 100644 index 000000000000..bd0b309ab260 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageVaultTagsUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageVaultTagsUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultTagsUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultTagsUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.cs new file mode 100644 index 000000000000..f8c7d0d68fba --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for updating tags in ExascaleDbStorageVault resources. + public partial class ExascaleDbStorageVaultTagsUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdateTags()); set => this._tag = value; } + + /// Creates an new instance. + public ExascaleDbStorageVaultTagsUpdate() + { + + } + } + /// The type used for updating tags in ExascaleDbStorageVault resources. + public partial interface IExascaleDbStorageVaultTagsUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags Tag { get; set; } + + } + /// The type used for updating tags in ExascaleDbStorageVault resources. + internal partial interface IExascaleDbStorageVaultTagsUpdateInternal + + { + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.json.cs new file mode 100644 index 000000000000..61af0be9db52 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdate.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for updating tags in ExascaleDbStorageVault resources. + public partial class ExascaleDbStorageVaultTagsUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageVaultTagsUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdateTags.FromJson(__jsonTags) : Tag;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageVaultTagsUpdate(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.PowerShell.cs new file mode 100644 index 000000000000..ef29217001fe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.PowerShell.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultTagsUpdateTagsTypeConverter))] + public partial class ExascaleDbStorageVaultTagsUpdateTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageVaultTagsUpdateTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageVaultTagsUpdateTags(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageVaultTagsUpdateTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageVaultTagsUpdateTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultTagsUpdateTagsTypeConverter))] + public partial interface IExascaleDbStorageVaultTagsUpdateTags + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.TypeConverter.cs new file mode 100644 index 000000000000..ea021e0e1a09 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageVaultTagsUpdateTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageVaultTagsUpdateTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultTagsUpdateTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultTagsUpdateTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.cs new file mode 100644 index 000000000000..9f4fd3dcb253 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class ExascaleDbStorageVaultTagsUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTagsInternal + { + + /// Creates an new instance. + public ExascaleDbStorageVaultTagsUpdateTags() + { + + } + } + /// Resource tags. + public partial interface IExascaleDbStorageVaultTagsUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface IExascaleDbStorageVaultTagsUpdateTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.dictionary.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.dictionary.cs new file mode 100644 index 000000000000..b3504ecf631a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExascaleDbStorageVaultTagsUpdateTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdateTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.json.cs new file mode 100644 index 000000000000..e9f8f9c3a849 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ExascaleDbStorageVaultTagsUpdateTags.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class ExascaleDbStorageVaultTagsUpdateTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + /// + internal ExascaleDbStorageVaultTagsUpdateTags(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageVaultTagsUpdateTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.PowerShell.cs new file mode 100644 index 000000000000..a4990485d929 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// File configuration options + [System.ComponentModel.TypeConverter(typeof(FileSystemConfigurationDetailsTypeConverter))] + public partial class FileSystemConfigurationDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FileSystemConfigurationDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FileSystemConfigurationDetails(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FileSystemConfigurationDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MountPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).MountPoint = (string) content.GetValueForProperty("MountPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).MountPoint, global::System.Convert.ToString); + } + if (content.Contains("FileSystemSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).FileSystemSizeGb = (int?) content.GetValueForProperty("FileSystemSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).FileSystemSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FileSystemConfigurationDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MountPoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).MountPoint = (string) content.GetValueForProperty("MountPoint",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).MountPoint, global::System.Convert.ToString); + } + if (content.Contains("FileSystemSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).FileSystemSizeGb = (int?) content.GetValueForProperty("FileSystemSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal)this).FileSystemSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// File configuration options + [System.ComponentModel.TypeConverter(typeof(FileSystemConfigurationDetailsTypeConverter))] + public partial interface IFileSystemConfigurationDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.TypeConverter.cs new file mode 100644 index 000000000000..1418d6a1416c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FileSystemConfigurationDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FileSystemConfigurationDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FileSystemConfigurationDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FileSystemConfigurationDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.cs new file mode 100644 index 000000000000..f83d4c256d3d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// File configuration options + public partial class FileSystemConfigurationDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetailsInternal + { + + /// Backing field for property. + private int? _fileSystemSizeGb; + + /// Size of the VM + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? FileSystemSizeGb { get => this._fileSystemSizeGb; set => this._fileSystemSizeGb = value; } + + /// Backing field for property. + private string _mountPoint; + + /// Mount path + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string MountPoint { get => this._mountPoint; set => this._mountPoint = value; } + + /// Creates an new instance. + public FileSystemConfigurationDetails() + { + + } + } + /// File configuration options + public partial interface IFileSystemConfigurationDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Size of the VM + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Size of the VM", + SerializedName = @"fileSystemSizeGb", + PossibleTypes = new [] { typeof(int) })] + int? FileSystemSizeGb { get; set; } + /// Mount path + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Mount path", + SerializedName = @"mountPoint", + PossibleTypes = new [] { typeof(string) })] + string MountPoint { get; set; } + + } + /// File configuration options + internal partial interface IFileSystemConfigurationDetailsInternal + + { + /// Size of the VM + int? FileSystemSizeGb { get; set; } + /// Mount path + string MountPoint { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.json.cs new file mode 100644 index 000000000000..fe383174eaae --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FileSystemConfigurationDetails.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// File configuration options + public partial class FileSystemConfigurationDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal FileSystemConfigurationDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_mountPoint = If( json?.PropertyT("mountPoint"), out var __jsonMountPoint) ? (string)__jsonMountPoint : (string)MountPoint;} + {_fileSystemSizeGb = If( json?.PropertyT("fileSystemSizeGb"), out var __jsonFileSystemSizeGb) ? (int?)__jsonFileSystemSizeGb : FileSystemSizeGb;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new FileSystemConfigurationDetails(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._mountPoint)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._mountPoint.ToString()) : null, "mountPoint" ,container.Add ); + AddIf( null != this._fileSystemSizeGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._fileSystemSizeGb) : null, "fileSystemSizeGb" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.PowerShell.cs new file mode 100644 index 000000000000..30e36c7b0146 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.PowerShell.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// FlexComponent Resource Definition + [System.ComponentModel.TypeConverter(typeof(FlexComponentTypeConverter))] + public partial class FlexComponent + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlexComponent(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlexComponent(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlexComponent(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HardwareType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).HardwareType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType?) content.GetValueForProperty("HardwareType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).HardwareType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType.CreateFrom); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableDbStorageInGb = (int?) content.GetValueForProperty("AvailableDbStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableDbStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableLocalStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableLocalStorageInGb = (int?) content.GetValueForProperty("AvailableLocalStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableLocalStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("DescriptionSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).DescriptionSummary = (string) content.GetValueForProperty("DescriptionSummary",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).DescriptionSummary, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlexComponent(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("HardwareType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).HardwareType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType?) content.GetValueForProperty("HardwareType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).HardwareType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType.CreateFrom); + } + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableDbStorageInGb = (int?) content.GetValueForProperty("AvailableDbStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableDbStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableLocalStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableLocalStorageInGb = (int?) content.GetValueForProperty("AvailableLocalStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).AvailableLocalStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("DescriptionSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).DescriptionSummary = (string) content.GetValueForProperty("DescriptionSummary",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal)this).DescriptionSummary, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// FlexComponent Resource Definition + [System.ComponentModel.TypeConverter(typeof(FlexComponentTypeConverter))] + public partial interface IFlexComponent + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.TypeConverter.cs new file mode 100644 index 000000000000..1bf6e636da41 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlexComponentTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlexComponent.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlexComponent.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlexComponent.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.cs new file mode 100644 index 000000000000..d4094efef85b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.cs @@ -0,0 +1,335 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// FlexComponent Resource Definition + public partial class FlexComponent : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableCoreCount; } + + /// + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableDbStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableDbStorageInGb; } + + /// + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableLocalStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableLocalStorageInGb; } + + /// + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? AvailableMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableMemoryInGb; } + + /// The compute model of the DB Server for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).ComputeModel; } + + /// The description summary for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DescriptionSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).DescriptionSummary; } + + /// + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? HardwareType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).HardwareType; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for AvailableCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.AvailableCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableCoreCount = value; } + + /// Internal Acessors for AvailableDbStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.AvailableDbStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableDbStorageInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableDbStorageInGb = value; } + + /// Internal Acessors for AvailableLocalStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.AvailableLocalStorageInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableLocalStorageInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableLocalStorageInGb = value; } + + /// Internal Acessors for AvailableMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.AvailableMemoryInGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableMemoryInGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).AvailableMemoryInGb = value; } + + /// Internal Acessors for ComputeModel + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.ComputeModel { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).ComputeModel; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).ComputeModel = value; } + + /// Internal Acessors for DescriptionSummary + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.DescriptionSummary { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).DescriptionSummary; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).DescriptionSummary = value; } + + /// Internal Acessors for HardwareType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.HardwareType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).HardwareType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).HardwareType = value; } + + /// Internal Acessors for MinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.MinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).MinimumCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).MinimumCoreCount = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentProperties()); set { {_property = value;} } } + + /// Internal Acessors for RuntimeMinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.RuntimeMinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).RuntimeMinimumCoreCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).RuntimeMinimumCoreCount = value; } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentInternal.Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).Shape; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).Shape = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? MinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).MinimumCoreCount; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentProperties()); set => this._property = value; } + + /// + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? RuntimeMinimumCoreCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).RuntimeMinimumCoreCount; } + + /// The name of the DB system shape for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Shape { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)Property).Shape; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public FlexComponent() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// FlexComponent Resource Definition + public partial interface IFlexComponent : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"availableCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCount { get; } + /// + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum storage that can be enabled on the Storage Server for this Flex Component.", + SerializedName = @"availableDbStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbStorageInGb { get; } + /// + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum local storage that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"availableLocalStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableLocalStorageInGb { get; } + /// + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum memory size that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"availableMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryInGb { get; } + /// The compute model of the DB Server for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the DB Server for this Flex Component.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(string) })] + string ComputeModel { get; } + /// The description summary for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The description summary for this Flex Component.", + SerializedName = @"descriptionSummary", + PossibleTypes = new [] { typeof(string) })] + string DescriptionSummary { get; } + /// + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component.", + SerializedName = @"hardwareType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? HardwareType { get; } + /// + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"minimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumCoreCount { get; } + /// + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The runtime minimum number of CPU cores that can be enabled for this Flex Component.", + SerializedName = @"runtimeMinimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? RuntimeMinimumCoreCount { get; } + /// The name of the DB system shape for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the DB system shape for this Flex Component.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + + } + /// FlexComponent Resource Definition + internal partial interface IFlexComponentInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + int? AvailableCoreCount { get; set; } + /// + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// + int? AvailableDbStorageInGb { get; set; } + /// + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// + int? AvailableLocalStorageInGb { get; set; } + /// + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// + int? AvailableMemoryInGb { get; set; } + /// The compute model of the DB Server for this Flex Component. + string ComputeModel { get; set; } + /// The description summary for this Flex Component. + string DescriptionSummary { get; set; } + /// + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? HardwareType { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + int? MinimumCoreCount { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties Property { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// + int? RuntimeMinimumCoreCount { get; set; } + /// The name of the DB system shape for this Flex Component. + string Shape { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.json.cs new file mode 100644 index 000000000000..afc902768439 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponent.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// FlexComponent Resource Definition + public partial class FlexComponent + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal FlexComponent(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new FlexComponent(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.PowerShell.cs new file mode 100644 index 000000000000..c99810689fb1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a FlexComponent list operation. + [System.ComponentModel.TypeConverter(typeof(FlexComponentListResultTypeConverter))] + public partial class FlexComponentListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlexComponentListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlexComponentListResult(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlexComponentListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlexComponentListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a FlexComponent list operation. + [System.ComponentModel.TypeConverter(typeof(FlexComponentListResultTypeConverter))] + public partial interface IFlexComponentListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.TypeConverter.cs new file mode 100644 index 000000000000..8e70a2bb11b3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlexComponentListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlexComponentListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlexComponentListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlexComponentListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.cs new file mode 100644 index 000000000000..623fd8e3928e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a FlexComponent list operation. + public partial class FlexComponentListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent[] _value; + + /// The FlexComponent items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public FlexComponentListResult() + { + + } + } + /// The response of a FlexComponent list operation. + public partial interface IFlexComponentListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The FlexComponent items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The FlexComponent items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent[] Value { get; set; } + + } + /// The response of a FlexComponent list operation. + internal partial interface IFlexComponentListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The FlexComponent items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.json.cs new file mode 100644 index 000000000000..9b16bc7459d6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a FlexComponent list operation. + public partial class FlexComponentListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal FlexComponentListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponent.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new FlexComponentListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.PowerShell.cs new file mode 100644 index 000000000000..3dcac2002c51 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// FlexComponent resource model + [System.ComponentModel.TypeConverter(typeof(FlexComponentPropertiesTypeConverter))] + public partial class FlexComponentProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new FlexComponentProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new FlexComponentProperties(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal FlexComponentProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableDbStorageInGb = (int?) content.GetValueForProperty("AvailableDbStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableDbStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableLocalStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableLocalStorageInGb = (int?) content.GetValueForProperty("AvailableLocalStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableLocalStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("HardwareType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).HardwareType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType?) content.GetValueForProperty("HardwareType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).HardwareType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType.CreateFrom); + } + if (content.Contains("DescriptionSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).DescriptionSummary = (string) content.GetValueForProperty("DescriptionSummary",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).DescriptionSummary, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal FlexComponentProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).MinimumCoreCount = (int?) content.GetValueForProperty("MinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).MinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableCoreCount = (int?) content.GetValueForProperty("AvailableCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableDbStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableDbStorageInGb = (int?) content.GetValueForProperty("AvailableDbStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableDbStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("RuntimeMinimumCoreCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).RuntimeMinimumCoreCount = (int?) content.GetValueForProperty("RuntimeMinimumCoreCount",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).RuntimeMinimumCoreCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("AvailableMemoryInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableMemoryInGb = (int?) content.GetValueForProperty("AvailableMemoryInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableMemoryInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("AvailableLocalStorageInGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableLocalStorageInGb = (int?) content.GetValueForProperty("AvailableLocalStorageInGb",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).AvailableLocalStorageInGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ComputeModel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).ComputeModel = (string) content.GetValueForProperty("ComputeModel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).ComputeModel, global::System.Convert.ToString); + } + if (content.Contains("HardwareType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).HardwareType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType?) content.GetValueForProperty("HardwareType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).HardwareType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType.CreateFrom); + } + if (content.Contains("DescriptionSummary")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).DescriptionSummary = (string) content.GetValueForProperty("DescriptionSummary",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal)this).DescriptionSummary, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// FlexComponent resource model + [System.ComponentModel.TypeConverter(typeof(FlexComponentPropertiesTypeConverter))] + public partial interface IFlexComponentProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.TypeConverter.cs new file mode 100644 index 000000000000..72584c5064b9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class FlexComponentPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return FlexComponentProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return FlexComponentProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return FlexComponentProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.cs new file mode 100644 index 000000000000..8097111a71d7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// FlexComponent resource model + public partial class FlexComponentProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal + { + + /// Backing field for property. + private int? _availableCoreCount; + + /// + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableCoreCount { get => this._availableCoreCount; } + + /// Backing field for property. + private int? _availableDbStorageInGb; + + /// + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableDbStorageInGb { get => this._availableDbStorageInGb; } + + /// Backing field for property. + private int? _availableLocalStorageInGb; + + /// + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableLocalStorageInGb { get => this._availableLocalStorageInGb; } + + /// Backing field for property. + private int? _availableMemoryInGb; + + /// + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? AvailableMemoryInGb { get => this._availableMemoryInGb; } + + /// Backing field for property. + private string _computeModel; + + /// The compute model of the DB Server for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ComputeModel { get => this._computeModel; } + + /// Backing field for property. + private string _descriptionSummary; + + /// The description summary for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DescriptionSummary { get => this._descriptionSummary; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? _hardwareType; + + /// + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? HardwareType { get => this._hardwareType; } + + /// Internal Acessors for AvailableCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.AvailableCoreCount { get => this._availableCoreCount; set { {_availableCoreCount = value;} } } + + /// Internal Acessors for AvailableDbStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.AvailableDbStorageInGb { get => this._availableDbStorageInGb; set { {_availableDbStorageInGb = value;} } } + + /// Internal Acessors for AvailableLocalStorageInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.AvailableLocalStorageInGb { get => this._availableLocalStorageInGb; set { {_availableLocalStorageInGb = value;} } } + + /// Internal Acessors for AvailableMemoryInGb + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.AvailableMemoryInGb { get => this._availableMemoryInGb; set { {_availableMemoryInGb = value;} } } + + /// Internal Acessors for ComputeModel + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.ComputeModel { get => this._computeModel; set { {_computeModel = value;} } } + + /// Internal Acessors for DescriptionSummary + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.DescriptionSummary { get => this._descriptionSummary; set { {_descriptionSummary = value;} } } + + /// Internal Acessors for HardwareType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.HardwareType { get => this._hardwareType; set { {_hardwareType = value;} } } + + /// Internal Acessors for MinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.MinimumCoreCount { get => this._minimumCoreCount; set { {_minimumCoreCount = value;} } } + + /// Internal Acessors for RuntimeMinimumCoreCount + int? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.RuntimeMinimumCoreCount { get => this._runtimeMinimumCoreCount; set { {_runtimeMinimumCoreCount = value;} } } + + /// Internal Acessors for Shape + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentPropertiesInternal.Shape { get => this._shape; set { {_shape = value;} } } + + /// Backing field for property. + private int? _minimumCoreCount; + + /// + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? MinimumCoreCount { get => this._minimumCoreCount; } + + /// Backing field for property. + private int? _runtimeMinimumCoreCount; + + /// + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RuntimeMinimumCoreCount { get => this._runtimeMinimumCoreCount; } + + /// Backing field for property. + private string _shape; + + /// The name of the DB system shape for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Shape { get => this._shape; } + + /// Creates an new instance. + public FlexComponentProperties() + { + + } + } + /// FlexComponent resource model + public partial interface IFlexComponentProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"availableCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? AvailableCoreCount { get; } + /// + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum storage that can be enabled on the Storage Server for this Flex Component.", + SerializedName = @"availableDbStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableDbStorageInGb { get; } + /// + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum local storage that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"availableLocalStorageInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableLocalStorageInGb { get; } + /// + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The maximum memory size that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"availableMemoryInGbs", + PossibleTypes = new [] { typeof(int) })] + int? AvailableMemoryInGb { get; } + /// The compute model of the DB Server for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The compute model of the DB Server for this Flex Component.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(string) })] + string ComputeModel { get; } + /// The description summary for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The description summary for this Flex Component.", + SerializedName = @"descriptionSummary", + PossibleTypes = new [] { typeof(string) })] + string DescriptionSummary { get; } + /// + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component.", + SerializedName = @"hardwareType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? HardwareType { get; } + /// + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component.", + SerializedName = @"minimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? MinimumCoreCount { get; } + /// + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The runtime minimum number of CPU cores that can be enabled for this Flex Component.", + SerializedName = @"runtimeMinimumCoreCount", + PossibleTypes = new [] { typeof(int) })] + int? RuntimeMinimumCoreCount { get; } + /// The name of the DB system shape for this Flex Component. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the DB system shape for this Flex Component.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; } + + } + /// FlexComponent resource model + internal partial interface IFlexComponentPropertiesInternal + + { + /// + /// The maximum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + int? AvailableCoreCount { get; set; } + /// + /// The maximum storage that can be enabled on the Storage Server for this Flex Component. + /// + int? AvailableDbStorageInGb { get; set; } + /// + /// The maximum local storage that can be enabled on the DB Server for this Flex Component. + /// + int? AvailableLocalStorageInGb { get; set; } + /// + /// The maximum memory size that can be enabled on the DB Server for this Flex Component. + /// + int? AvailableMemoryInGb { get; set; } + /// The compute model of the DB Server for this Flex Component. + string ComputeModel { get; set; } + /// The description summary for this Flex Component. + string DescriptionSummary { get; set; } + /// + /// The hardware type of the DB (Compute) or Storage (Cell) Server for this Flex Component. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType? HardwareType { get; set; } + /// + /// The minimum number of CPU cores that can be enabled on the DB Server for this Flex Component. + /// + int? MinimumCoreCount { get; set; } + /// + /// The runtime minimum number of CPU cores that can be enabled for this Flex Component. + /// + int? RuntimeMinimumCoreCount { get; set; } + /// The name of the DB system shape for this Flex Component. + string Shape { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.json.cs new file mode 100644 index 000000000000..0dd3f49ba6a8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/FlexComponentProperties.json.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// FlexComponent resource model + public partial class FlexComponentProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal FlexComponentProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_minimumCoreCount = If( json?.PropertyT("minimumCoreCount"), out var __jsonMinimumCoreCount) ? (int?)__jsonMinimumCoreCount : MinimumCoreCount;} + {_availableCoreCount = If( json?.PropertyT("availableCoreCount"), out var __jsonAvailableCoreCount) ? (int?)__jsonAvailableCoreCount : AvailableCoreCount;} + {_availableDbStorageInGb = If( json?.PropertyT("availableDbStorageInGbs"), out var __jsonAvailableDbStorageInGbs) ? (int?)__jsonAvailableDbStorageInGbs : AvailableDbStorageInGb;} + {_runtimeMinimumCoreCount = If( json?.PropertyT("runtimeMinimumCoreCount"), out var __jsonRuntimeMinimumCoreCount) ? (int?)__jsonRuntimeMinimumCoreCount : RuntimeMinimumCoreCount;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)Shape;} + {_availableMemoryInGb = If( json?.PropertyT("availableMemoryInGbs"), out var __jsonAvailableMemoryInGbs) ? (int?)__jsonAvailableMemoryInGbs : AvailableMemoryInGb;} + {_availableLocalStorageInGb = If( json?.PropertyT("availableLocalStorageInGbs"), out var __jsonAvailableLocalStorageInGbs) ? (int?)__jsonAvailableLocalStorageInGbs : AvailableLocalStorageInGb;} + {_computeModel = If( json?.PropertyT("computeModel"), out var __jsonComputeModel) ? (string)__jsonComputeModel : (string)ComputeModel;} + {_hardwareType = If( json?.PropertyT("hardwareType"), out var __jsonHardwareType) ? (string)__jsonHardwareType : (string)HardwareType;} + {_descriptionSummary = If( json?.PropertyT("descriptionSummary"), out var __jsonDescriptionSummary) ? (string)__jsonDescriptionSummary : (string)DescriptionSummary;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new FlexComponentProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._minimumCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._minimumCoreCount) : null, "minimumCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._availableCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableCoreCount) : null, "availableCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._availableDbStorageInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableDbStorageInGb) : null, "availableDbStorageInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._runtimeMinimumCoreCount ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._runtimeMinimumCoreCount) : null, "runtimeMinimumCoreCount" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._availableMemoryInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableMemoryInGb) : null, "availableMemoryInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._availableLocalStorageInGb ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._availableLocalStorageInGb) : null, "availableLocalStorageInGbs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._computeModel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._computeModel.ToString()) : null, "computeModel" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._hardwareType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hardwareType.ToString()) : null, "hardwareType" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._descriptionSummary)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._descriptionSummary.ToString()) : null, "descriptionSummary" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.PowerShell.cs new file mode 100644 index 000000000000..89d4f22c997c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.PowerShell.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Autonomous Database Generate Wallet resource model. + [System.ComponentModel.TypeConverter(typeof(GenerateAutonomousDatabaseWalletDetailsTypeConverter))] + public partial class GenerateAutonomousDatabaseWalletDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GenerateAutonomousDatabaseWalletDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GenerateAutonomousDatabaseWalletDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GenerateAutonomousDatabaseWalletDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GenerateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType?) content.GetValueForProperty("GenerateType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType.CreateFrom); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password, (object ss) => (System.Security.SecureString)ss); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GenerateAutonomousDatabaseWalletDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GenerateType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType?) content.GetValueForProperty("GenerateType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).GenerateType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType.CreateFrom); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Password")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password = (System.Security.SecureString) content.GetValueForProperty("Password",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal)this).Password, (object ss) => (System.Security.SecureString)ss); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Autonomous Database Generate Wallet resource model. + [System.ComponentModel.TypeConverter(typeof(GenerateAutonomousDatabaseWalletDetailsTypeConverter))] + public partial interface IGenerateAutonomousDatabaseWalletDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.TypeConverter.cs new file mode 100644 index 000000000000..4dcbe8e0a17b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GenerateAutonomousDatabaseWalletDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GenerateAutonomousDatabaseWalletDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GenerateAutonomousDatabaseWalletDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GenerateAutonomousDatabaseWalletDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.cs new file mode 100644 index 000000000000..4625d3c1cbc3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.cs @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database Generate Wallet resource model. + public partial class GenerateAutonomousDatabaseWalletDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetailsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType? _generateType; + + /// The type of wallet to generate. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType? GenerateType { get => this._generateType; set => this._generateType = value; } + + /// Backing field for property. + private bool? _isRegional; + + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsRegional { get => this._isRegional; set => this._isRegional = value; } + + /// Backing field for property. + private System.Security.SecureString _password; + + /// The password to encrypt the keys inside the wallet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public System.Security.SecureString Password { get => this._password; set => this._password = value; } + + /// Creates an new instance. + public GenerateAutonomousDatabaseWalletDetails() + { + + } + } + /// Autonomous Database Generate Wallet resource model. + public partial interface IGenerateAutonomousDatabaseWalletDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The type of wallet to generate. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of wallet to generate.", + SerializedName = @"generateType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType? GenerateType { get; set; } + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only.", + SerializedName = @"isRegional", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRegional { get; set; } + /// The password to encrypt the keys inside the wallet + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The password to encrypt the keys inside the wallet", + SerializedName = @"password", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + System.Security.SecureString Password { get; set; } + + } + /// Autonomous Database Generate Wallet resource model. + internal partial interface IGenerateAutonomousDatabaseWalletDetailsInternal + + { + /// The type of wallet to generate. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType? GenerateType { get; set; } + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + bool? IsRegional { get; set; } + /// The password to encrypt the keys inside the wallet + System.Security.SecureString Password { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.json.cs new file mode 100644 index 000000000000..0dbce4014f32 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GenerateAutonomousDatabaseWalletDetails.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Autonomous Database Generate Wallet resource model. + public partial class GenerateAutonomousDatabaseWalletDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new GenerateAutonomousDatabaseWalletDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal GenerateAutonomousDatabaseWalletDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_generateType = If( json?.PropertyT("generateType"), out var __jsonGenerateType) ? (string)__jsonGenerateType : (string)GenerateType;} + {_isRegional = If( json?.PropertyT("isRegional"), out var __jsonIsRegional) ? (bool?)__jsonIsRegional : IsRegional;} + {_password = If( json?.PropertyT("password"), out var __jsonPassword) ? new System.Net.NetworkCredential("",(string)__jsonPassword).SecurePassword : Password;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._generateType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._generateType.ToString()) : null, "generateType" ,container.Add ); + AddIf( null != this._isRegional ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isRegional) : null, "isRegional" ,container.Add ); + AddIf( null != (((object)this._password)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(System.Runtime.InteropServices.Marshal.PtrToStringBSTR(System.Runtime.InteropServices.Marshal.SecureStringToBSTR(this._password))) : null, "password" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.PowerShell.cs new file mode 100644 index 000000000000..a8ed3bd13ecb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.PowerShell.cs @@ -0,0 +1,242 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + [System.ComponentModel.TypeConverter(typeof(GiMinorVersionTypeConverter))] + public partial class GiMinorVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiMinorVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiMinorVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiMinorVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).GridImageOcid, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiMinorVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal)this).GridImageOcid, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + [System.ComponentModel.TypeConverter(typeof(GiMinorVersionTypeConverter))] + public partial interface IGiMinorVersion + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.TypeConverter.cs new file mode 100644 index 000000000000..4ab8eb0ea57c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiMinorVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiMinorVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiMinorVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiMinorVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.cs new file mode 100644 index 000000000000..152938dc5e55 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + public partial class GiMinorVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// Grid Infrastructure Image Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string GridImageOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)Property).GridImageOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)Property).GridImageOcid = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)Property).Version = value ?? null; } + + /// Creates an new instance. + public GiMinorVersion() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + public partial interface IGiMinorVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// Grid Infrastructure Image Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Grid Infrastructure Image Id", + SerializedName = @"gridImageOcid", + PossibleTypes = new [] { typeof(string) })] + string GridImageOcid { get; set; } + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A valid Oracle Grid Infrastructure (GI) software version.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + internal partial interface IGiMinorVersionInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// Grid Infrastructure Image Id + string GridImageOcid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties Property { get; set; } + /// A valid Oracle Grid Infrastructure (GI) software version. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.json.cs new file mode 100644 index 000000000000..326f6ff12b76 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersion.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The Oracle Grid Infrastructure (GI) minor version resource definition. + public partial class GiMinorVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new GiMinorVersion(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal GiMinorVersion(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..4d210c95a720 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a GiMinorVersion list operation. + [System.ComponentModel.TypeConverter(typeof(GiMinorVersionListResultTypeConverter))] + public partial class GiMinorVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiMinorVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiMinorVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiMinorVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiMinorVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a GiMinorVersion list operation. + [System.ComponentModel.TypeConverter(typeof(GiMinorVersionListResultTypeConverter))] + public partial interface IGiMinorVersionListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..3040aabb8aba --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiMinorVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiMinorVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiMinorVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiMinorVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.cs new file mode 100644 index 000000000000..131f8a29f79a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a GiMinorVersion list operation. + public partial class GiMinorVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion[] _value; + + /// The GiMinorVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public GiMinorVersionListResult() + { + + } + } + /// The response of a GiMinorVersion list operation. + public partial interface IGiMinorVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The GiMinorVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The GiMinorVersion items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion[] Value { get; set; } + + } + /// The response of a GiMinorVersion list operation. + internal partial interface IGiMinorVersionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The GiMinorVersion items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.json.cs new file mode 100644 index 000000000000..549850840e8b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a GiMinorVersion list operation. + public partial class GiMinorVersionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new GiMinorVersionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal GiMinorVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersion.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..662337ff1445 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The Oracle Grid Infrastructure (GI) minor version properties + [System.ComponentModel.TypeConverter(typeof(GiMinorVersionPropertiesTypeConverter))] + public partial class GiMinorVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiMinorVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiMinorVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiMinorVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).GridImageOcid, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiMinorVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + if (content.Contains("GridImageOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).GridImageOcid = (string) content.GetValueForProperty("GridImageOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal)this).GridImageOcid, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The Oracle Grid Infrastructure (GI) minor version properties + [System.ComponentModel.TypeConverter(typeof(GiMinorVersionPropertiesTypeConverter))] + public partial interface IGiMinorVersionProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.TypeConverter.cs new file mode 100644 index 000000000000..7ce72a4eec37 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiMinorVersionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiMinorVersionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiMinorVersionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiMinorVersionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.cs new file mode 100644 index 000000000000..088ed483c222 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The Oracle Grid Infrastructure (GI) minor version properties + public partial class GiMinorVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionPropertiesInternal + { + + /// Backing field for property. + private string _gridImageOcid; + + /// Grid Infrastructure Image Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string GridImageOcid { get => this._gridImageOcid; set => this._gridImageOcid = value; } + + /// Backing field for property. + private string _version; + + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public GiMinorVersionProperties() + { + + } + } + /// The Oracle Grid Infrastructure (GI) minor version properties + public partial interface IGiMinorVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Grid Infrastructure Image Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Grid Infrastructure Image Id", + SerializedName = @"gridImageOcid", + PossibleTypes = new [] { typeof(string) })] + string GridImageOcid { get; set; } + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A valid Oracle Grid Infrastructure (GI) software version.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// The Oracle Grid Infrastructure (GI) minor version properties + internal partial interface IGiMinorVersionPropertiesInternal + + { + /// Grid Infrastructure Image Id + string GridImageOcid { get; set; } + /// A valid Oracle Grid Infrastructure (GI) software version. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.json.cs new file mode 100644 index 000000000000..bc255485ae88 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiMinorVersionProperties.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The Oracle Grid Infrastructure (GI) minor version properties + public partial class GiMinorVersionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new GiMinorVersionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal GiMinorVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + {_gridImageOcid = If( json?.PropertyT("gridImageOcid"), out var __jsonGridImageOcid) ? (string)__jsonGridImageOcid : (string)GridImageOcid;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AddIf( null != (((object)this._gridImageOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._gridImageOcid.ToString()) : null, "gridImageOcid" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.PowerShell.cs new file mode 100644 index 000000000000..4307d0ffa75d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// GiVersion resource definition + [System.ComponentModel.TypeConverter(typeof(GiVersionTypeConverter))] + public partial class GiVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// GiVersion resource definition + [System.ComponentModel.TypeConverter(typeof(GiVersionTypeConverter))] + public partial interface IGiVersion + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.TypeConverter.cs new file mode 100644 index 000000000000..6bef75c46674 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.cs new file mode 100644 index 000000000000..a1e0d89ae7f1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// GiVersion resource definition + public partial class GiVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Version { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionPropertiesInternal)Property).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionPropertiesInternal)Property).Version = value ?? null; } + + /// Creates an new instance. + public GiVersion() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// GiVersion resource definition + public partial interface IGiVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A valid Oracle Grid Infrastructure (GI) software version.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// GiVersion resource definition + internal partial interface IGiVersionInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties Property { get; set; } + /// A valid Oracle Grid Infrastructure (GI) software version. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.json.cs new file mode 100644 index 000000000000..3d46f64ad35a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersion.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// GiVersion resource definition + public partial class GiVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new GiVersion(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal GiVersion(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..a9785ad0f8d2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a GiVersion list operation. + [System.ComponentModel.TypeConverter(typeof(GiVersionListResultTypeConverter))] + public partial class GiVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a GiVersion list operation. + [System.ComponentModel.TypeConverter(typeof(GiVersionListResultTypeConverter))] + public partial interface IGiVersionListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..a686bc885d79 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.cs new file mode 100644 index 000000000000..93dc4a5e5070 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a GiVersion list operation. + public partial class GiVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion[] _value; + + /// The GiVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public GiVersionListResult() + { + + } + } + /// The response of a GiVersion list operation. + public partial interface IGiVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The GiVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The GiVersion items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion[] Value { get; set; } + + } + /// The response of a GiVersion list operation. + internal partial interface IGiVersionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The GiVersion items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.json.cs new file mode 100644 index 000000000000..c72bfae909c8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a GiVersion list operation. + public partial class GiVersionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new GiVersionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal GiVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersion.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..017b94325b9f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// GiVersion resource model + [System.ComponentModel.TypeConverter(typeof(GiVersionPropertiesTypeConverter))] + public partial class GiVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new GiVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new GiVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal GiVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal GiVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionPropertiesInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionPropertiesInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// GiVersion resource model + [System.ComponentModel.TypeConverter(typeof(GiVersionPropertiesTypeConverter))] + public partial interface IGiVersionProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.TypeConverter.cs new file mode 100644 index 000000000000..58a40359b642 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class GiVersionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return GiVersionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return GiVersionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return GiVersionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.cs new file mode 100644 index 000000000000..317986479352 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// GiVersion resource model + public partial class GiVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionPropertiesInternal + { + + /// Backing field for property. + private string _version; + + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public GiVersionProperties() + { + + } + } + /// GiVersion resource model + public partial interface IGiVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// A valid Oracle Grid Infrastructure (GI) software version. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A valid Oracle Grid Infrastructure (GI) software version.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// GiVersion resource model + internal partial interface IGiVersionPropertiesInternal + + { + /// A valid Oracle Grid Infrastructure (GI) software version. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.json.cs new file mode 100644 index 000000000000..3af4dcd4f877 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/GiVersionProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// GiVersion resource model + public partial class GiVersionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new GiVersionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal GiVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.PowerShell.cs new file mode 100644 index 000000000000..37032e08aba8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Details for the long-term backup schedule. + [System.ComponentModel.TypeConverter(typeof(LongTermBackUpScheduleDetailsTypeConverter))] + public partial class LongTermBackUpScheduleDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LongTermBackUpScheduleDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LongTermBackUpScheduleDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal LongTermBackUpScheduleDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("RepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("TimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("TimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LongTermBackUpScheduleDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("RepeatCadence")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType?) content.GetValueForProperty("RepeatCadence",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RepeatCadence, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType.CreateFrom); + } + if (content.Contains("TimeOfBackup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup = (global::System.DateTime?) content.GetValueForProperty("TimeOfBackup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).TimeOfBackup, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("RetentionPeriodInDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay = (int?) content.GetValueForProperty("RetentionPeriodInDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).RetentionPeriodInDay, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsDisabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled = (bool?) content.GetValueForProperty("IsDisabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal)this).IsDisabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Details for the long-term backup schedule. + [System.ComponentModel.TypeConverter(typeof(LongTermBackUpScheduleDetailsTypeConverter))] + public partial interface ILongTermBackUpScheduleDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.TypeConverter.cs new file mode 100644 index 000000000000..f94c2c96b6a9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LongTermBackUpScheduleDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LongTermBackUpScheduleDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LongTermBackUpScheduleDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LongTermBackUpScheduleDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.cs new file mode 100644 index 000000000000..0917ca0dbea8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.cs @@ -0,0 +1,117 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Details for the long-term backup schedule. + public partial class LongTermBackUpScheduleDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetailsInternal + { + + /// Backing field for property. + private bool? _isDisabled; + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsDisabled { get => this._isDisabled; set => this._isDisabled = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? _repeatCadence; + + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? RepeatCadence { get => this._repeatCadence; set => this._repeatCadence = value; } + + /// Backing field for property. + private int? _retentionPeriodInDay; + + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetentionPeriodInDay { get => this._retentionPeriodInDay; set => this._retentionPeriodInDay = value; } + + /// Backing field for property. + private global::System.DateTime? _timeOfBackup; + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeOfBackup { get => this._timeOfBackup; set => this._timeOfBackup = value; } + + /// Creates an new instance. + public LongTermBackUpScheduleDetails() + { + + } + } + /// Details for the long-term backup schedule. + public partial interface ILongTermBackUpScheduleDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDisabled { get; set; } + /// The frequency of the long-term backup schedule + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? RepeatCadence { get; set; } + /// Retention period, in days, for backups. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + int? RetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeOfBackup { get; set; } + + } + /// Details for the long-term backup schedule. + internal partial interface ILongTermBackUpScheduleDetailsInternal + + { + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + bool? IsDisabled { get; set; } + /// The frequency of the long-term backup schedule + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType? RepeatCadence { get; set; } + /// Retention period, in days, for backups. + int? RetentionPeriodInDay { get; set; } + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + global::System.DateTime? TimeOfBackup { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.json.cs new file mode 100644 index 000000000000..e01e2706d97c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/LongTermBackUpScheduleDetails.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Details for the long-term backup schedule. + public partial class LongTermBackUpScheduleDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ILongTermBackUpScheduleDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new LongTermBackUpScheduleDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal LongTermBackUpScheduleDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_repeatCadence = If( json?.PropertyT("repeatCadence"), out var __jsonRepeatCadence) ? (string)__jsonRepeatCadence : (string)RepeatCadence;} + {_timeOfBackup = If( json?.PropertyT("timeOfBackup"), out var __jsonTimeOfBackup) ? global::System.DateTime.TryParse((string)__jsonTimeOfBackup, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeOfBackupValue) ? __jsonTimeOfBackupValue : TimeOfBackup : TimeOfBackup;} + {_retentionPeriodInDay = If( json?.PropertyT("retentionPeriodInDays"), out var __jsonRetentionPeriodInDays) ? (int?)__jsonRetentionPeriodInDays : RetentionPeriodInDay;} + {_isDisabled = If( json?.PropertyT("isDisabled"), out var __jsonIsDisabled) ? (bool?)__jsonIsDisabled : IsDisabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._repeatCadence)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._repeatCadence.ToString()) : null, "repeatCadence" ,container.Add ); + AddIf( null != this._timeOfBackup ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeOfBackup?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeOfBackup" ,container.Add ); + AddIf( null != this._retentionPeriodInDay ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._retentionPeriodInDay) : null, "retentionPeriodInDays" ,container.Add ); + AddIf( null != this._isDisabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isDisabled) : null, "isDisabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.PowerShell.cs new file mode 100644 index 000000000000..1d97cf0352cd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// MaintenanceWindow resource properties + [System.ComponentModel.TypeConverter(typeof(MaintenanceWindowTypeConverter))] + public partial class MaintenanceWindow + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceWindow(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceWindow(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal MaintenanceWindow(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Preference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Preference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("Preference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Preference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("Month")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Month = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("Month",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Month, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("WeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).WeeksOfMonth = (int[]) content.GetValueForProperty("WeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).WeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("DaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).DaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("DaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).DaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("HoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).HoursOfDay = (int[]) content.GetValueForProperty("HoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).HoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("LeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).LeadTimeInWeek = (int?) content.GetValueForProperty("LeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).LeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).PatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("PatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).PatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("CustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin = (int?) content.GetValueForProperty("CustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("IsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("IsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MaintenanceWindow(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Preference")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Preference = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference?) content.GetValueForProperty("Preference",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Preference, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference.CreateFrom); + } + if (content.Contains("Month")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Month = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[]) content.GetValueForProperty("Month",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).Month, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.MonthTypeConverter.ConvertFrom)); + } + if (content.Contains("WeeksOfMonth")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).WeeksOfMonth = (int[]) content.GetValueForProperty("WeeksOfMonth",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).WeeksOfMonth, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("DaysOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).DaysOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[]) content.GetValueForProperty("DaysOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).DaysOfWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("HoursOfDay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).HoursOfDay = (int[]) content.GetValueForProperty("HoursOfDay",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).HoursOfDay, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + if (content.Contains("LeadTimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).LeadTimeInWeek = (int?) content.GetValueForProperty("LeadTimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).LeadTimeInWeek, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PatchingMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).PatchingMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode?) content.GetValueForProperty("PatchingMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).PatchingMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode.CreateFrom); + } + if (content.Contains("CustomActionTimeoutInMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin = (int?) content.GetValueForProperty("CustomActionTimeoutInMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).CustomActionTimeoutInMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("IsCustomActionTimeoutEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled = (bool?) content.GetValueForProperty("IsCustomActionTimeoutEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsCustomActionTimeoutEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsMonthlyPatchingEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled = (bool?) content.GetValueForProperty("IsMonthlyPatchingEnabled",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal)this).IsMonthlyPatchingEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// MaintenanceWindow resource properties + [System.ComponentModel.TypeConverter(typeof(MaintenanceWindowTypeConverter))] + public partial interface IMaintenanceWindow + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.TypeConverter.cs new file mode 100644 index 000000000000..7be6572ebe00 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceWindowTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceWindow.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceWindow.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceWindow.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.cs new file mode 100644 index 000000000000..f25f03bcabe9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.cs @@ -0,0 +1,264 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// MaintenanceWindow resource properties + public partial class MaintenanceWindow : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindowInternal + { + + /// Backing field for property. + private int? _customActionTimeoutInMin; + + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? CustomActionTimeoutInMin { get => this._customActionTimeoutInMin; set => this._customActionTimeoutInMin = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] _daysOfWeek; + + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] DaysOfWeek { get => this._daysOfWeek; set => this._daysOfWeek = value; } + + /// Backing field for property. + private int[] _hoursOfDay; + + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int[] HoursOfDay { get => this._hoursOfDay; set => this._hoursOfDay = value; } + + /// Backing field for property. + private bool? _isCustomActionTimeoutEnabled; + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsCustomActionTimeoutEnabled { get => this._isCustomActionTimeoutEnabled; set => this._isCustomActionTimeoutEnabled = value; } + + /// Backing field for property. + private bool? _isMonthlyPatchingEnabled; + + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsMonthlyPatchingEnabled { get => this._isMonthlyPatchingEnabled; set => this._isMonthlyPatchingEnabled = value; } + + /// Backing field for property. + private int? _leadTimeInWeek; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? LeadTimeInWeek { get => this._leadTimeInWeek; set => this._leadTimeInWeek = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] _month; + + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] Month { get => this._month; set => this._month = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? _patchingMode; + + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? PatchingMode { get => this._patchingMode; set => this._patchingMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? _preference; + + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? Preference { get => this._preference; set => this._preference = value; } + + /// Backing field for property. + private int[] _weeksOfMonth; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int[] WeeksOfMonth { get => this._weeksOfMonth; set => this._weeksOfMonth = value; } + + /// Creates an new instance. + public MaintenanceWindow() + { + + } + } + /// MaintenanceWindow resource properties + public partial interface IMaintenanceWindow : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + int? CustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] DaysOfWeek { get; set; } + /// + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + int[] HoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(bool) })] + bool? IsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + int? LeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] Month { get; set; } + /// Cloud Exadata infrastructure node patching method. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? PatchingMode { get; set; } + /// The maintenance window scheduling preference. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? Preference { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + int[] WeeksOfMonth { get; set; } + + } + /// MaintenanceWindow resource properties + internal partial interface IMaintenanceWindowInternal + + { + /// + /// 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). + /// + int? CustomActionTimeoutInMin { get; set; } + /// Days during the week when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] DaysOfWeek { get; set; } + /// + /// 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 + /// + int[] HoursOfDay { get; set; } + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + bool? IsCustomActionTimeoutEnabled { get; set; } + /// is Monthly Patching Enabled + bool? IsMonthlyPatchingEnabled { get; set; } + /// + /// 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. + /// + int? LeadTimeInWeek { get; set; } + /// Months during the year when maintenance should be performed. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] Month { get; set; } + /// Cloud Exadata infrastructure node patching method. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode? PatchingMode { get; set; } + /// The maintenance window scheduling preference. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference? Preference { get; set; } + /// + /// 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. + /// + int[] WeeksOfMonth { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.json.cs new file mode 100644 index 000000000000..f9a7975475c7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/MaintenanceWindow.json.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// MaintenanceWindow resource properties + public partial class MaintenanceWindow + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMaintenanceWindow FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new MaintenanceWindow(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal MaintenanceWindow(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_preference = If( json?.PropertyT("preference"), out var __jsonPreference) ? (string)__jsonPreference : (string)Preference;} + {_month = If( json?.PropertyT("months"), out var __jsonMonths) ? If( __jsonMonths as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.Month.FromJson(__u) )) ))() : null : Month;} + {_weeksOfMonth = If( json?.PropertyT("weeksOfMonth"), out var __jsonWeeksOfMonth) ? If( __jsonWeeksOfMonth as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(int) (__p is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber __o ? (int)__o : default(int))) ))() : null : WeeksOfMonth;} + {_daysOfWeek = If( json?.PropertyT("daysOfWeek"), out var __jsonDaysOfWeek) ? If( __jsonDaysOfWeek as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeek.FromJson(__k) )) ))() : null : DaysOfWeek;} + {_hoursOfDay = If( json?.PropertyT("hoursOfDay"), out var __jsonHoursOfDay) ? If( __jsonHoursOfDay as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __g) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__g, (__f)=>(int) (__f is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber __e ? (int)__e : default(int))) ))() : null : HoursOfDay;} + {_leadTimeInWeek = If( json?.PropertyT("leadTimeInWeeks"), out var __jsonLeadTimeInWeeks) ? (int?)__jsonLeadTimeInWeeks : LeadTimeInWeek;} + {_patchingMode = If( json?.PropertyT("patchingMode"), out var __jsonPatchingMode) ? (string)__jsonPatchingMode : (string)PatchingMode;} + {_customActionTimeoutInMin = If( json?.PropertyT("customActionTimeoutInMins"), out var __jsonCustomActionTimeoutInMins) ? (int?)__jsonCustomActionTimeoutInMins : CustomActionTimeoutInMin;} + {_isCustomActionTimeoutEnabled = If( json?.PropertyT("isCustomActionTimeoutEnabled"), out var __jsonIsCustomActionTimeoutEnabled) ? (bool?)__jsonIsCustomActionTimeoutEnabled : IsCustomActionTimeoutEnabled;} + {_isMonthlyPatchingEnabled = If( json?.PropertyT("isMonthlyPatchingEnabled"), out var __jsonIsMonthlyPatchingEnabled) ? (bool?)__jsonIsMonthlyPatchingEnabled : IsMonthlyPatchingEnabled;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._preference)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._preference.ToString()) : null, "preference" ,container.Add ); + if (null != this._month) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._month ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("months",__w); + } + if (null != this._weeksOfMonth) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._weeksOfMonth ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(__s) ,__r.Add); + } + container.Add("weeksOfMonth",__r); + } + if (null != this._daysOfWeek) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __n in this._daysOfWeek ) + { + AddIf(__n?.ToJson(null, serializationMode) ,__m.Add); + } + container.Add("daysOfWeek",__m); + } + if (null != this._hoursOfDay) + { + var __h = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __i in this._hoursOfDay ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(__i) ,__h.Add); + } + container.Add("hoursOfDay",__h); + } + AddIf( null != this._leadTimeInWeek ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._leadTimeInWeek) : null, "leadTimeInWeeks" ,container.Add ); + AddIf( null != (((object)this._patchingMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._patchingMode.ToString()) : null, "patchingMode" ,container.Add ); + AddIf( null != this._customActionTimeoutInMin ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber((int)this._customActionTimeoutInMin) : null, "customActionTimeoutInMins" ,container.Add ); + AddIf( null != this._isCustomActionTimeoutEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isCustomActionTimeoutEnabled) : null, "isCustomActionTimeoutEnabled" ,container.Add ); + AddIf( null != this._isMonthlyPatchingEnabled ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isMonthlyPatchingEnabled) : null, "isMonthlyPatchingEnabled" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.PowerShell.cs new file mode 100644 index 000000000000..a29097c9fd1c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Month resource properties + [System.ComponentModel.TypeConverter(typeof(MonthTypeConverter))] + public partial class Month + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Month(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Month(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Month(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonthInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonthInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Month(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonthInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonthInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Month resource properties + [System.ComponentModel.TypeConverter(typeof(MonthTypeConverter))] + public partial interface IMonth + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.TypeConverter.cs new file mode 100644 index 000000000000..992a1196d4f0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MonthTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Month.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Month.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Month.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.cs new file mode 100644 index 000000000000..0789c8a6ada9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Month resource properties + public partial class Month : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonthInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName _name; + + /// Name of the month of the year. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName Name { get => this._name; set => this._name = value; } + + /// Creates an new instance. + public Month() + { + + } + } + /// Month resource properties + public partial interface IMonth : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Name of the month of the year. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the month of the year.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName Name { get; set; } + + } + /// Month resource properties + internal partial interface IMonthInternal + + { + /// Name of the month of the year. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName Name { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.json.cs new file mode 100644 index 000000000000..96e13e2fe0b4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/Month.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Month resource properties + public partial class Month + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new Month(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal Month(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.PowerShell.cs new file mode 100644 index 000000000000..18b02aa1ab69 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// A rule for allowing inbound (INGRESS) IP packets + [System.ComponentModel.TypeConverter(typeof(NsgCidrTypeConverter))] + public partial class NsgCidr + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new NsgCidr(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new NsgCidr(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal NsgCidr(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DestinationPortRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRange = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRange, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PortRangeTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("DestinationPortRangeMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMin = (int) content.GetValueForProperty("DestinationPortRangeMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationPortRangeMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMax = (int) content.GetValueForProperty("DestinationPortRangeMax",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal NsgCidr(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DestinationPortRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRange = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange) content.GetValueForProperty("DestinationPortRange",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRange, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PortRangeTypeConverter.ConvertFrom); + } + if (content.Contains("Source")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).Source = (string) content.GetValueForProperty("Source",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).Source, global::System.Convert.ToString); + } + if (content.Contains("DestinationPortRangeMin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMin = (int) content.GetValueForProperty("DestinationPortRangeMin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMin, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DestinationPortRangeMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMax = (int) content.GetValueForProperty("DestinationPortRangeMax",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal)this).DestinationPortRangeMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A rule for allowing inbound (INGRESS) IP packets + [System.ComponentModel.TypeConverter(typeof(NsgCidrTypeConverter))] + public partial interface INsgCidr + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.TypeConverter.cs new file mode 100644 index 000000000000..c9835cdb3ef4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class NsgCidrTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return NsgCidr.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return NsgCidr.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return NsgCidr.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.cs new file mode 100644 index 000000000000..de7c489d02a5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// A rule for allowing inbound (INGRESS) IP packets + public partial class NsgCidr : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange _destinationPortRange; + + /// Destination port range to specify particular destination ports for TCP rules. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange DestinationPortRange { get => (this._destinationPortRange = this._destinationPortRange ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PortRange()); set => this._destinationPortRange = value; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DestinationPortRangeMax { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)DestinationPortRange).Max; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)DestinationPortRange).Max = value ?? default(int); } + + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public int? DestinationPortRangeMin { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)DestinationPortRange).Min; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)DestinationPortRange).Min = value ?? default(int); } + + /// Internal Acessors for DestinationPortRange + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidrInternal.DestinationPortRange { get => (this._destinationPortRange = this._destinationPortRange ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PortRange()); set { {_destinationPortRange = value;} } } + + /// Backing field for property. + private string _source; + + /// + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Source { get => this._source; set => this._source = value; } + + /// Creates an new instance. + public NsgCidr() + { + + } + } + /// A rule for allowing inbound (INGRESS) IP packets + public partial interface INsgCidr : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"max", + PossibleTypes = new [] { typeof(int) })] + int? DestinationPortRangeMax { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum port number, which must not be greater than the maximum port number.", + SerializedName = @"min", + PossibleTypes = new [] { typeof(int) })] + int? DestinationPortRangeMin { get; set; } + /// + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Conceptually, this is the range of IP addresses that a packet coming into the instance can come from.", + SerializedName = @"source", + PossibleTypes = new [] { typeof(string) })] + string Source { get; set; } + + } + /// A rule for allowing inbound (INGRESS) IP packets + internal partial interface INsgCidrInternal + + { + /// Destination port range to specify particular destination ports for TCP rules. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange DestinationPortRange { get; set; } + /// + /// 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. + /// + int? DestinationPortRangeMax { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + int? DestinationPortRangeMin { get; set; } + /// + /// Conceptually, this is the range of IP addresses that a packet coming into the instance can come from. + /// + string Source { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.json.cs new file mode 100644 index 000000000000..230d352d0818 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/NsgCidr.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// A rule for allowing inbound (INGRESS) IP packets + public partial class NsgCidr + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new NsgCidr(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal NsgCidr(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_destinationPortRange = If( json?.PropertyT("destinationPortRange"), out var __jsonDestinationPortRange) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PortRange.FromJson(__jsonDestinationPortRange) : DestinationPortRange;} + {_source = If( json?.PropertyT("source"), out var __jsonSource) ? (string)__jsonSource : (string)Source;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._destinationPortRange ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._destinationPortRange.ToJson(null,serializationMode) : null, "destinationPortRange" ,container.Add ); + AddIf( null != (((object)this._source)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._source.ToString()) : null, "source" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.PowerShell.cs new file mode 100644 index 000000000000..d0db712c1dcf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.PowerShell.cs @@ -0,0 +1,370 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// OracleSubscription resource definition + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionTypeConverter))] + public partial class OracleSubscription + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscription(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscription(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscription(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.PlanTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState.CreateFrom); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState?) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState.CreateFrom); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("AzureSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureSubscriptionId = (string[]) content.GetValueForProperty("AzureSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureSubscriptionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AddSubscriptionOperationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AddSubscriptionOperationState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState?) content.GetValueForProperty("AddSubscriptionOperationState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AddSubscriptionOperationState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState.CreateFrom); + } + if (content.Contains("LastOperationStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).LastOperationStatusDetail = (string) content.GetValueForProperty("LastOperationStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).LastOperationStatusDetail, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscription(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.PlanTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState.CreateFrom); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState?) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).CloudAccountState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState.CreateFrom); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("AzureSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureSubscriptionId = (string[]) content.GetValueForProperty("AzureSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureSubscriptionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AddSubscriptionOperationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AddSubscriptionOperationState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState?) content.GetValueForProperty("AddSubscriptionOperationState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AddSubscriptionOperationState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState.CreateFrom); + } + if (content.Contains("LastOperationStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).LastOperationStatusDetail = (string) content.GetValueForProperty("LastOperationStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).LastOperationStatusDetail, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// OracleSubscription resource definition + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionTypeConverter))] + public partial interface IOracleSubscription + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.TypeConverter.cs new file mode 100644 index 000000000000..625a3ca512b9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscription.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscription.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscription.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.cs new file mode 100644 index 000000000000..e5dfc4a78043 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.cs @@ -0,0 +1,427 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// OracleSubscription resource definition + public partial class OracleSubscription : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// State of the add Azure subscription operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? AddSubscriptionOperationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).AddSubscriptionOperationState; } + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Azure subscriptions to be added + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string[] AzureSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).AzureSubscriptionId; } + + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string CloudAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).CloudAccountId; } + + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? CloudAccountState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).CloudAccountState; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).Intent; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).Intent = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent)""); } + + /// Status details of the last operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LastOperationStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).LastOperationStatusDetail; } + + /// Internal Acessors for AddSubscriptionOperationState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.AddSubscriptionOperationState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).AddSubscriptionOperationState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).AddSubscriptionOperationState = value; } + + /// Internal Acessors for AzureSubscriptionId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.AzureSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).AzureSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).AzureSubscriptionId = value; } + + /// Internal Acessors for CloudAccountId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.CloudAccountId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).CloudAccountId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).CloudAccountId = value; } + + /// Internal Acessors for CloudAccountState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.CloudAccountState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).CloudAccountState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).CloudAccountState = value; } + + /// Internal Acessors for LastOperationStatusDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.LastOperationStatusDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).LastOperationStatusDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).LastOperationStatusDetail = value; } + + /// Internal Acessors for Plan + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Plan()); set { {_plan = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SaasSubscriptionId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal.SaasSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).SaasSubscriptionId; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).SaasSubscriptionId = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan _plan; + + /// Details of the resource plan. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Plan()); set => this._plan = value; } + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Name = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Product = value ?? null; } + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanPromotionCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).PromotionCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).PromotionCode = value ?? null; } + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Publisher = value ?? null; } + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)Plan).Version = value ?? null; } + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ProductCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).ProductCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).ProductCode = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionProperties()); set => this._property = value; } + + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).ProvisioningState; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SaasSubscriptionId { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).SaasSubscriptionId; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string TermUnit { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).TermUnit; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)Property).TermUnit = value ?? null; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Creates an new instance. + public OracleSubscription() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// OracleSubscription resource definition + public partial interface IOracleSubscription : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// State of the add Azure subscription operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"State of the add Azure subscription operation on Oracle subscription", + SerializedName = @"addSubscriptionOperationState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? AddSubscriptionOperationState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// Azure subscriptions to be added + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure subscriptions to be added", + SerializedName = @"azureSubscriptionIds", + PossibleTypes = new [] { typeof(string) })] + string[] AzureSubscriptionId { get; } + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud Account Id", + SerializedName = @"cloudAccountId", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountId { get; } + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud Account provisioning state.", + SerializedName = @"cloudAccountState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? CloudAccountState { get; } + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// Status details of the last operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status details of the last operation on Oracle subscription", + SerializedName = @"lastOperationStatusDetail", + PossibleTypes = new [] { typeof(string) })] + string LastOperationStatusDetail { get; } + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string PlanName { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string PlanVersion { get; set; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"OracleSubscriptionProvisioningState provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? ProvisioningState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"SAAS subscription ID generated by Marketplace", + SerializedName = @"saasSubscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SaasSubscriptionId { get; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601", + SerializedName = @"termUnit", + PossibleTypes = new [] { typeof(string) })] + string TermUnit { get; set; } + + } + /// OracleSubscription resource definition + internal partial interface IOracleSubscriptionInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// State of the add Azure subscription operation on Oracle subscription + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? AddSubscriptionOperationState { get; set; } + + string AzureAsyncOperation { get; set; } + /// Azure subscriptions to be added + string[] AzureSubscriptionId { get; set; } + /// Cloud Account Id + string CloudAccountId { get; set; } + /// Cloud Account provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? CloudAccountState { get; set; } + /// Intent for the update operation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// Status details of the last operation on Oracle subscription + string LastOperationStatusDetail { get; set; } + /// Details of the resource plan. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan Plan { get; set; } + /// A user defined name of the 3rd Party Artifact that is being procured. + string PlanName { get; set; } + /// + /// 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. + /// + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + string PlanVersion { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties Property { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? ProvisioningState { get; set; } + + int? RetryAfter { get; set; } + /// SAAS subscription ID generated by Marketplace + string SaasSubscriptionId { get; set; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + string TermUnit { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.json.cs new file mode 100644 index 000000000000..8931ba880731 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscription.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// OracleSubscription resource definition + public partial class OracleSubscription + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscription(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscription(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionProperties.FromJson(__jsonProperties) : Property;} + {_plan = If( json?.PropertyT("plan"), out var __jsonPlan) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Plan.FromJson(__jsonPlan) : Plan;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AddIf( null != this._plan ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._plan.ToJson(null,serializationMode) : null, "plan" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.PowerShell.cs new file mode 100644 index 000000000000..a133de79dadf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a OracleSubscription list operation. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionListResultTypeConverter))] + public partial class OracleSubscriptionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a OracleSubscription list operation. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionListResultTypeConverter))] + public partial interface IOracleSubscriptionListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.TypeConverter.cs new file mode 100644 index 000000000000..4de3c5bd8157 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.cs new file mode 100644 index 000000000000..b1182b8336dd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a OracleSubscription list operation. + public partial class OracleSubscriptionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription[] _value; + + /// The OracleSubscription items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public OracleSubscriptionListResult() + { + + } + } + /// The response of a OracleSubscription list operation. + public partial interface IOracleSubscriptionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The OracleSubscription items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The OracleSubscription items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription[] Value { get; set; } + + } + /// The response of a OracleSubscription list operation. + internal partial interface IOracleSubscriptionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The OracleSubscription items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.json.cs new file mode 100644 index 000000000000..b9854f6056a0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a OracleSubscription list operation. + public partial class OracleSubscriptionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscription.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.PowerShell.cs new file mode 100644 index 000000000000..555ea0c3fee8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Oracle Subscription resource model + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionPropertiesTypeConverter))] + public partial class OracleSubscriptionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState.CreateFrom); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState?) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState.CreateFrom); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + if (content.Contains("AzureSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AzureSubscriptionId = (string[]) content.GetValueForProperty("AzureSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AzureSubscriptionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AddSubscriptionOperationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AddSubscriptionOperationState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState?) content.GetValueForProperty("AddSubscriptionOperationState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AddSubscriptionOperationState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState.CreateFrom); + } + if (content.Contains("LastOperationStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).LastOperationStatusDetail = (string) content.GetValueForProperty("LastOperationStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).LastOperationStatusDetail, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState.CreateFrom); + } + if (content.Contains("SaasSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId = (string) content.GetValueForProperty("SaasSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).SaasSubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountId = (string) content.GetValueForProperty("CloudAccountId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountId, global::System.Convert.ToString); + } + if (content.Contains("CloudAccountState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState?) content.GetValueForProperty("CloudAccountState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).CloudAccountState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState.CreateFrom); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + if (content.Contains("AzureSubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AzureSubscriptionId = (string[]) content.GetValueForProperty("AzureSubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AzureSubscriptionId, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AddSubscriptionOperationState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AddSubscriptionOperationState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState?) content.GetValueForProperty("AddSubscriptionOperationState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).AddSubscriptionOperationState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState.CreateFrom); + } + if (content.Contains("LastOperationStatusDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).LastOperationStatusDetail = (string) content.GetValueForProperty("LastOperationStatusDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal)this).LastOperationStatusDetail, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Oracle Subscription resource model + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionPropertiesTypeConverter))] + public partial interface IOracleSubscriptionProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.TypeConverter.cs new file mode 100644 index 000000000000..53f8a7834d73 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.cs new file mode 100644 index 000000000000..4e2080bd7450 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.cs @@ -0,0 +1,225 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Oracle Subscription resource model + public partial class OracleSubscriptionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? _addSubscriptionOperationState; + + /// State of the add Azure subscription operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? AddSubscriptionOperationState { get => this._addSubscriptionOperationState; } + + /// Backing field for property. + private string[] _azureSubscriptionId; + + /// Azure subscriptions to be added + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string[] AzureSubscriptionId { get => this._azureSubscriptionId; } + + /// Backing field for property. + private string _cloudAccountId; + + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CloudAccountId { get => this._cloudAccountId; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? _cloudAccountState; + + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? CloudAccountState { get => this._cloudAccountState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? _intent; + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get => this._intent; set => this._intent = value; } + + /// Backing field for property. + private string _lastOperationStatusDetail; + + /// Status details of the last operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LastOperationStatusDetail { get => this._lastOperationStatusDetail; } + + /// Internal Acessors for AddSubscriptionOperationState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal.AddSubscriptionOperationState { get => this._addSubscriptionOperationState; set { {_addSubscriptionOperationState = value;} } } + + /// Internal Acessors for AzureSubscriptionId + string[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal.AzureSubscriptionId { get => this._azureSubscriptionId; set { {_azureSubscriptionId = value;} } } + + /// Internal Acessors for CloudAccountId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal.CloudAccountId { get => this._cloudAccountId; set { {_cloudAccountId = value;} } } + + /// Internal Acessors for CloudAccountState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal.CloudAccountState { get => this._cloudAccountState; set { {_cloudAccountState = value;} } } + + /// Internal Acessors for LastOperationStatusDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal.LastOperationStatusDetail { get => this._lastOperationStatusDetail; set { {_lastOperationStatusDetail = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SaasSubscriptionId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionPropertiesInternal.SaasSubscriptionId { get => this._saasSubscriptionId; set { {_saasSubscriptionId = value;} } } + + /// Backing field for property. + private string _productCode; + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ProductCode { get => this._productCode; set => this._productCode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? _provisioningState; + + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _saasSubscriptionId; + + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SaasSubscriptionId { get => this._saasSubscriptionId; } + + /// Backing field for property. + private string _termUnit; + + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TermUnit { get => this._termUnit; set => this._termUnit = value; } + + /// Creates an new instance. + public OracleSubscriptionProperties() + { + + } + } + /// Oracle Subscription resource model + public partial interface IOracleSubscriptionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// State of the add Azure subscription operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"State of the add Azure subscription operation on Oracle subscription", + SerializedName = @"addSubscriptionOperationState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? AddSubscriptionOperationState { get; } + /// Azure subscriptions to be added + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure subscriptions to be added", + SerializedName = @"azureSubscriptionIds", + PossibleTypes = new [] { typeof(string) })] + string[] AzureSubscriptionId { get; } + /// Cloud Account Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud Account Id", + SerializedName = @"cloudAccountId", + PossibleTypes = new [] { typeof(string) })] + string CloudAccountId { get; } + /// Cloud Account provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Cloud Account provisioning state.", + SerializedName = @"cloudAccountState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? CloudAccountState { get; } + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// Status details of the last operation on Oracle subscription + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Status details of the last operation on Oracle subscription", + SerializedName = @"lastOperationStatusDetail", + PossibleTypes = new [] { typeof(string) })] + string LastOperationStatusDetail { get; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"OracleSubscriptionProvisioningState provisioning state", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? ProvisioningState { get; } + /// SAAS subscription ID generated by Marketplace + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"SAAS subscription ID generated by Marketplace", + SerializedName = @"saasSubscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SaasSubscriptionId { get; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601", + SerializedName = @"termUnit", + PossibleTypes = new [] { typeof(string) })] + string TermUnit { get; set; } + + } + /// Oracle Subscription resource model + internal partial interface IOracleSubscriptionPropertiesInternal + + { + /// State of the add Azure subscription operation on Oracle subscription + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState? AddSubscriptionOperationState { get; set; } + /// Azure subscriptions to be added + string[] AzureSubscriptionId { get; set; } + /// Cloud Account Id + string CloudAccountId { get; set; } + /// Cloud Account provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState? CloudAccountState { get; set; } + /// Intent for the update operation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// Status details of the last operation on Oracle subscription + string LastOperationStatusDetail { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + /// OracleSubscriptionProvisioningState provisioning state + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState? ProvisioningState { get; set; } + /// SAAS subscription ID generated by Marketplace + string SaasSubscriptionId { get; set; } + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + string TermUnit { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.json.cs new file mode 100644 index 000000000000..79b8c1016c25 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionProperties.json.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Oracle Subscription resource model + public partial class OracleSubscriptionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_saasSubscriptionId = If( json?.PropertyT("saasSubscriptionId"), out var __jsonSaasSubscriptionId) ? (string)__jsonSaasSubscriptionId : (string)SaasSubscriptionId;} + {_cloudAccountId = If( json?.PropertyT("cloudAccountId"), out var __jsonCloudAccountId) ? (string)__jsonCloudAccountId : (string)CloudAccountId;} + {_cloudAccountState = If( json?.PropertyT("cloudAccountState"), out var __jsonCloudAccountState) ? (string)__jsonCloudAccountState : (string)CloudAccountState;} + {_termUnit = If( json?.PropertyT("termUnit"), out var __jsonTermUnit) ? (string)__jsonTermUnit : (string)TermUnit;} + {_productCode = If( json?.PropertyT("productCode"), out var __jsonProductCode) ? (string)__jsonProductCode : (string)ProductCode;} + {_intent = If( json?.PropertyT("intent"), out var __jsonIntent) ? (string)__jsonIntent : (string)Intent;} + {_azureSubscriptionId = If( json?.PropertyT("azureSubscriptionIds"), out var __jsonAzureSubscriptionIds) ? If( __jsonAzureSubscriptionIds as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AzureSubscriptionId;} + {_addSubscriptionOperationState = If( json?.PropertyT("addSubscriptionOperationState"), out var __jsonAddSubscriptionOperationState) ? (string)__jsonAddSubscriptionOperationState : (string)AddSubscriptionOperationState;} + {_lastOperationStatusDetail = If( json?.PropertyT("lastOperationStatusDetail"), out var __jsonLastOperationStatusDetail) ? (string)__jsonLastOperationStatusDetail : (string)LastOperationStatusDetail;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._saasSubscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._saasSubscriptionId.ToString()) : null, "saasSubscriptionId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._cloudAccountId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloudAccountId.ToString()) : null, "cloudAccountId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._cloudAccountState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloudAccountState.ToString()) : null, "cloudAccountState" ,container.Add ); + } + AddIf( null != (((object)this._termUnit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._termUnit.ToString()) : null, "termUnit" ,container.Add ); + AddIf( null != (((object)this._productCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._productCode.ToString()) : null, "productCode" ,container.Add ); + AddIf( null != (((object)this._intent)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._intent.ToString()) : null, "intent" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._azureSubscriptionId) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._azureSubscriptionId ) + { + AddIf(null != (((object)__x)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(__x.ToString()) : null ,__w.Add); + } + container.Add("azureSubscriptionIds",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._addSubscriptionOperationState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._addSubscriptionOperationState.ToString()) : null, "addSubscriptionOperationState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lastOperationStatusDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lastOperationStatusDetail.ToString()) : null, "lastOperationStatusDetail" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.PowerShell.cs new file mode 100644 index 000000000000..47d64656e317 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The type used for update operations of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdateTypeConverter))] + public partial class OracleSubscriptionUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PlanUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).ProductCode, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Plan")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Plan = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate) content.GetValueForProperty("Plan",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Plan, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PlanUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdatePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + if (content.Contains("PlanName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanName = (string) content.GetValueForProperty("PlanName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanName, global::System.Convert.ToString); + } + if (content.Contains("PlanPublisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPublisher = (string) content.GetValueForProperty("PlanPublisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPublisher, global::System.Convert.ToString); + } + if (content.Contains("PlanProduct")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanProduct = (string) content.GetValueForProperty("PlanProduct",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanProduct, global::System.Convert.ToString); + } + if (content.Contains("PlanPromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode = (string) content.GetValueForProperty("PlanPromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanPromotionCode, global::System.Convert.ToString); + } + if (content.Contains("PlanVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanVersion = (string) content.GetValueForProperty("PlanVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).PlanVersion, global::System.Convert.ToString); + } + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal)this).ProductCode, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The type used for update operations of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdateTypeConverter))] + public partial interface IOracleSubscriptionUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.TypeConverter.cs new file mode 100644 index 000000000000..ffdb9963a56c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.cs new file mode 100644 index 000000000000..33662f0201b0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.cs @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the OracleSubscription. + public partial class OracleSubscriptionUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal + { + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)Property).Intent; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)Property).Intent = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent)""); } + + /// Internal Acessors for Plan + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal.Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PlanUpdate()); set { {_plan = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdateProperties()); set { {_property = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate _plan; + + /// Details of the resource plan. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate Plan { get => (this._plan = this._plan ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PlanUpdate()); set => this._plan = value; } + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Name = value ?? null; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanProduct { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Product; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Product = value ?? null; } + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanPromotionCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).PromotionCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).PromotionCode = value ?? null; } + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanPublisher { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Publisher; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Publisher = value ?? null; } + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PlanVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Version; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)Plan).Version = value ?? null; } + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string ProductCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)Property).ProductCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)Property).ProductCode = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdateProperties()); set => this._property = value; } + + /// Creates an new instance. + public OracleSubscriptionUpdate() + { + + } + } + /// The type used for update operations of the OracleSubscription. + public partial interface IOracleSubscriptionUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string PlanName { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string PlanVersion { get; set; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + + } + /// The type used for update operations of the OracleSubscription. + internal partial interface IOracleSubscriptionUpdateInternal + + { + /// Intent for the update operation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// Details of the resource plan. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate Plan { get; set; } + /// A user defined name of the 3rd Party Artifact that is being procured. + string PlanName { get; set; } + /// + /// 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. + /// + string PlanProduct { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PlanPromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string PlanPublisher { get; set; } + /// The version of the desired product/artifact. + string PlanVersion { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.json.cs new file mode 100644 index 000000000000..946221162dcd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdate.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The type used for update operations of the OracleSubscription. + public partial class OracleSubscriptionUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_plan = If( json?.PropertyT("plan"), out var __jsonPlan) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PlanUpdate.FromJson(__jsonPlan) : Plan;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdateProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._plan ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._plan.ToJson(null,serializationMode) : null, "plan" ,container.Add ); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.PowerShell.cs new file mode 100644 index 000000000000..783682675285 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The updatable properties of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdatePropertiesTypeConverter))] + public partial class OracleSubscriptionUpdateProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionUpdateProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionUpdateProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionUpdateProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionUpdateProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ProductCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode = (string) content.GetValueForProperty("ProductCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).ProductCode, global::System.Convert.ToString); + } + if (content.Contains("Intent")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).Intent = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent?) content.GetValueForProperty("Intent",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal)this).Intent, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The updatable properties of the OracleSubscription. + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionUpdatePropertiesTypeConverter))] + public partial interface IOracleSubscriptionUpdateProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.TypeConverter.cs new file mode 100644 index 000000000000..0ad0c7632a69 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.TypeConverter.cs @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionUpdatePropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionUpdateProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdateProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionUpdateProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.cs new file mode 100644 index 000000000000..ae0177d1ba35 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the OracleSubscription. + public partial class OracleSubscriptionUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdatePropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? _intent; + + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get => this._intent; set => this._intent = value; } + + /// Backing field for property. + private string _productCode; + + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ProductCode { get => this._productCode; set => this._productCode = value; } + + /// Creates an new instance. + public OracleSubscriptionUpdateProperties() + { + + } + } + /// The updatable properties of the OracleSubscription. + public partial interface IOracleSubscriptionUpdateProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Intent for the update operation + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// Product code for the term unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + string ProductCode { get; set; } + + } + /// The updatable properties of the OracleSubscription. + internal partial interface IOracleSubscriptionUpdatePropertiesInternal + + { + /// Intent for the update operation + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent? Intent { get; set; } + /// Product code for the term unit + string ProductCode { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.json.cs new file mode 100644 index 000000000000..24768d749cd2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/OracleSubscriptionUpdateProperties.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The updatable properties of the OracleSubscription. + public partial class OracleSubscriptionUpdateProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdateProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionUpdateProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionUpdateProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_productCode = If( json?.PropertyT("productCode"), out var __jsonProductCode) ? (string)__jsonProductCode : (string)ProductCode;} + {_intent = If( json?.PropertyT("intent"), out var __jsonIntent) ? (string)__jsonIntent : (string)Intent;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._productCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._productCode.ToString()) : null, "productCode" ,container.Add ); + AddIf( null != (((object)this._intent)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._intent.ToString()) : null, "intent" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.PowerShell.cs new file mode 100644 index 000000000000..9323ef145f52 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// PeerDb Details + [System.ComponentModel.TypeConverter(typeof(PeerDbDetailsTypeConverter))] + public partial class PeerDbDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PeerDbDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PeerDbDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PeerDbDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("PeerDbOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbOcid = (string) content.GetValueForProperty("PeerDbOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbOcid, global::System.Convert.ToString); + } + if (content.Contains("PeerDbLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbLocation = (string) content.GetValueForProperty("PeerDbLocation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbLocation, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PeerDbDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PeerDbId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbId = (string) content.GetValueForProperty("PeerDbId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbId, global::System.Convert.ToString); + } + if (content.Contains("PeerDbOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbOcid = (string) content.GetValueForProperty("PeerDbOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbOcid, global::System.Convert.ToString); + } + if (content.Contains("PeerDbLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbLocation = (string) content.GetValueForProperty("PeerDbLocation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal)this).PeerDbLocation, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// PeerDb Details + [System.ComponentModel.TypeConverter(typeof(PeerDbDetailsTypeConverter))] + public partial interface IPeerDbDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.TypeConverter.cs new file mode 100644 index 000000000000..9946c358a0e7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PeerDbDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PeerDbDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PeerDbDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PeerDbDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.cs new file mode 100644 index 000000000000..49e21f4186c6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// PeerDb Details + public partial class PeerDbDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetailsInternal + { + + /// Backing field for property. + private string _peerDbId; + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PeerDbId { get => this._peerDbId; set => this._peerDbId = value; } + + /// Backing field for property. + private string _peerDbLocation; + + /// The location of the Disaster Recovery peer database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PeerDbLocation { get => this._peerDbLocation; set => this._peerDbLocation = value; } + + /// Backing field for property. + private string _peerDbOcid; + + /// + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PeerDbOcid { get => this._peerDbOcid; set => this._peerDbOcid = value; } + + /// Creates an new instance. + public PeerDbDetails() + { + + } + } + /// PeerDb Details + public partial interface IPeerDbDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + string PeerDbId { get; set; } + /// The location of the Disaster Recovery peer database. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Disaster Recovery peer database.", + SerializedName = @"peerDbLocation", + PossibleTypes = new [] { typeof(string) })] + string PeerDbLocation { get; set; } + /// + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbOcid", + PossibleTypes = new [] { typeof(string) })] + string PeerDbOcid { get; set; } + + } + /// PeerDb Details + internal partial interface IPeerDbDetailsInternal + + { + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + string PeerDbId { get; set; } + /// The location of the Disaster Recovery peer database. + string PeerDbLocation { get; set; } + /// + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// + string PeerDbOcid { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.json.cs new file mode 100644 index 000000000000..1f030476e527 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PeerDbDetails.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// PeerDb Details + public partial class PeerDbDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new PeerDbDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal PeerDbDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_peerDbId = If( json?.PropertyT("peerDbId"), out var __jsonPeerDbId) ? (string)__jsonPeerDbId : (string)PeerDbId;} + {_peerDbOcid = If( json?.PropertyT("peerDbOcid"), out var __jsonPeerDbOcid) ? (string)__jsonPeerDbOcid : (string)PeerDbOcid;} + {_peerDbLocation = If( json?.PropertyT("peerDbLocation"), out var __jsonPeerDbLocation) ? (string)__jsonPeerDbLocation : (string)PeerDbLocation;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._peerDbId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._peerDbId.ToString()) : null, "peerDbId" ,container.Add ); + AddIf( null != (((object)this._peerDbOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._peerDbOcid.ToString()) : null, "peerDbOcid" ,container.Add ); + AddIf( null != (((object)this._peerDbLocation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._peerDbLocation.ToString()) : null, "peerDbLocation" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.PowerShell.cs new file mode 100644 index 000000000000..73bc96181199 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// ResourcePlanTypeUpdate model definition + [System.ComponentModel.TypeConverter(typeof(PlanUpdateTypeConverter))] + public partial class PlanUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PlanUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PlanUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PlanUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PlanUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// ResourcePlanTypeUpdate model definition + [System.ComponentModel.TypeConverter(typeof(PlanUpdateTypeConverter))] + public partial interface IPlanUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.TypeConverter.cs new file mode 100644 index 000000000000..0fd7034acee2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PlanUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PlanUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PlanUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PlanUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.cs new file mode 100644 index 000000000000..43f2a901cbf0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ResourcePlanTypeUpdate model definition + public partial class PlanUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdateInternal + { + + /// Backing field for property. + private string _name; + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _product; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Product { get => this._product; set => this._product = value; } + + /// Backing field for property. + private string _promotionCode; + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PromotionCode { get => this._promotionCode; set => this._promotionCode = value; } + + /// Backing field for property. + private string _publisher; + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Publisher { get => this._publisher; set => this._publisher = value; } + + /// Backing field for property. + private string _version; + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public PlanUpdate() + { + + } + } + /// ResourcePlanTypeUpdate model definition + public partial interface IPlanUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string Publisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// ResourcePlanTypeUpdate model definition + internal partial interface IPlanUpdateInternal + + { + /// A user defined name of the 3rd Party Artifact that is being procured. + string Name { get; set; } + /// + /// 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. + /// + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string Publisher { get; set; } + /// The version of the desired product/artifact. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.json.cs new file mode 100644 index 000000000000..70971ff30239 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PlanUpdate.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// ResourcePlanTypeUpdate model definition + public partial class PlanUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPlanUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new PlanUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal PlanUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_publisher = If( json?.PropertyT("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)Publisher;} + {_product = If( json?.PropertyT("product"), out var __jsonProduct) ? (string)__jsonProduct : (string)Product;} + {_promotionCode = If( json?.PropertyT("promotionCode"), out var __jsonPromotionCode) ? (string)__jsonPromotionCode : (string)PromotionCode;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._publisher)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._publisher.ToString()) : null, "publisher" ,container.Add ); + AddIf( null != (((object)this._product)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._product.ToString()) : null, "product" ,container.Add ); + AddIf( null != (((object)this._promotionCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._promotionCode.ToString()) : null, "promotionCode" ,container.Add ); + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.PowerShell.cs new file mode 100644 index 000000000000..461fe084343f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Port Range to specify particular destination ports for TCP rules. + [System.ComponentModel.TypeConverter(typeof(PortRangeTypeConverter))] + public partial class PortRange + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PortRange(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PortRange(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PortRange(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Min")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Min = (int) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Max")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Max = (int) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PortRange(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Min")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Min = (int) content.GetValueForProperty("Min",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Min, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Max")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Max = (int) content.GetValueForProperty("Max",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal)this).Max, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Port Range to specify particular destination ports for TCP rules. + [System.ComponentModel.TypeConverter(typeof(PortRangeTypeConverter))] + public partial interface IPortRange + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.TypeConverter.cs new file mode 100644 index 000000000000..95164a0b66e0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PortRangeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PortRange.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PortRange.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PortRange.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.cs new file mode 100644 index 000000000000..688877458c87 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.cs @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Port Range to specify particular destination ports for TCP rules. + public partial class PortRange : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRangeInternal + { + + /// Backing field for property. + private int _max; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int Max { get => this._max; set => this._max = value; } + + /// Backing field for property. + private int _min; + + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int Min { get => this._min; set => this._min = value; } + + /// Creates an new instance. + public PortRange() + { + + } + } + /// Port Range to specify particular destination ports for TCP rules. + public partial interface IPortRange : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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.", + SerializedName = @"max", + PossibleTypes = new [] { typeof(int) })] + int Max { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The minimum port number, which must not be greater than the maximum port number.", + SerializedName = @"min", + PossibleTypes = new [] { typeof(int) })] + int Min { get; set; } + + } + /// Port Range to specify particular destination ports for TCP rules. + internal partial interface IPortRangeInternal + + { + /// + /// 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. + /// + int Max { get; set; } + /// + /// The minimum port number, which must not be greater than the maximum port number. + /// + int Min { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.json.cs new file mode 100644 index 000000000000..a54e0a965459 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PortRange.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Port Range to specify particular destination ports for TCP rules. + public partial class PortRange + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPortRange FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new PortRange(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal PortRange(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_min = If( json?.PropertyT("min"), out var __jsonMin) ? (int)__jsonMin : Min;} + {_max = If( json?.PropertyT("max"), out var __jsonMax) ? (int)__jsonMax : Max;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._min), "min" ,container.Add ); + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNumber(this._max), "max" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.PowerShell.cs new file mode 100644 index 000000000000..d526075fc0b0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// PrivateIpAddress resource properties + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressPropertiesTypeConverter))] + public partial class PrivateIPAddressProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PrivateIPAddressProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PrivateIPAddressProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PrivateIPAddressProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostnameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).HostnameLabel = (string) content.GetValueForProperty("HostnameLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).HostnameLabel, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PrivateIPAddressProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostnameLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).HostnameLabel = (string) content.GetValueForProperty("HostnameLabel",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).HostnameLabel, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal)this).SubnetId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// PrivateIpAddress resource properties + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressPropertiesTypeConverter))] + public partial interface IPrivateIPAddressProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.TypeConverter.cs new file mode 100644 index 000000000000..4a37b578994e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PrivateIPAddressPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PrivateIPAddressProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PrivateIPAddressProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PrivateIPAddressProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.cs new file mode 100644 index 000000000000..0508509c45d3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// PrivateIpAddress resource properties + public partial class PrivateIPAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressPropertiesInternal + { + + /// Backing field for property. + private string _displayName; + + /// PrivateIpAddresses displayName + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private string _hostnameLabel; + + /// PrivateIpAddresses hostnameLabel + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string HostnameLabel { get => this._hostnameLabel; set => this._hostnameLabel = value; } + + /// Backing field for property. + private string _iPAddress; + + /// PrivateIpAddresses ipAddress + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string IPAddress { get => this._iPAddress; set => this._iPAddress = value; } + + /// Backing field for property. + private string _ocid; + + /// PrivateIpAddresses Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// Backing field for property. + private string _subnetId; + + /// PrivateIpAddresses subnetId + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Creates an new instance. + public PrivateIPAddressProperties() + { + + } + } + /// PrivateIpAddress resource properties + public partial interface IPrivateIPAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// PrivateIpAddresses displayName + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"PrivateIpAddresses displayName", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// PrivateIpAddresses hostnameLabel + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"PrivateIpAddresses hostnameLabel", + SerializedName = @"hostnameLabel", + PossibleTypes = new [] { typeof(string) })] + string HostnameLabel { get; set; } + /// PrivateIpAddresses ipAddress + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"PrivateIpAddresses ipAddress", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + string IPAddress { get; set; } + /// PrivateIpAddresses Id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"PrivateIpAddresses Id", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; set; } + /// PrivateIpAddresses subnetId + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"PrivateIpAddresses subnetId", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + + } + /// PrivateIpAddress resource properties + internal partial interface IPrivateIPAddressPropertiesInternal + + { + /// PrivateIpAddresses displayName + string DisplayName { get; set; } + /// PrivateIpAddresses hostnameLabel + string HostnameLabel { get; set; } + /// PrivateIpAddresses ipAddress + string IPAddress { get; set; } + /// PrivateIpAddresses Id + string Ocid { get; set; } + /// PrivateIpAddresses subnetId + string SubnetId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.json.cs new file mode 100644 index 000000000000..a9d5b89a6446 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressProperties.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// PrivateIpAddress resource properties + public partial class PrivateIPAddressProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new PrivateIPAddressProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateIPAddressProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_hostnameLabel = If( json?.PropertyT("hostnameLabel"), out var __jsonHostnameLabel) ? (string)__jsonHostnameLabel : (string)HostnameLabel;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_iPAddress = If( json?.PropertyT("ipAddress"), out var __jsonIPAddress) ? (string)__jsonIPAddress : (string)IPAddress;} + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._hostnameLabel)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hostnameLabel.ToString()) : null, "hostnameLabel" ,container.Add ); + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + AddIf( null != (((object)this._iPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._iPAddress.ToString()) : null, "ipAddress" ,container.Add ); + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.PowerShell.cs new file mode 100644 index 000000000000..a3eabb8897c2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Private Ip Addresses filter + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressesFilterTypeConverter))] + public partial class PrivateIPAddressesFilter + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new PrivateIPAddressesFilter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new PrivateIPAddressesFilter(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal PrivateIPAddressesFilter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).VnicId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal PrivateIPAddressesFilter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).SubnetId = (string) content.GetValueForProperty("SubnetId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).SubnetId, global::System.Convert.ToString); + } + if (content.Contains("VnicId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).VnicId = (string) content.GetValueForProperty("VnicId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal)this).VnicId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Private Ip Addresses filter + [System.ComponentModel.TypeConverter(typeof(PrivateIPAddressesFilterTypeConverter))] + public partial interface IPrivateIPAddressesFilter + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.TypeConverter.cs new file mode 100644 index 000000000000..0ad47b11aa24 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PrivateIPAddressesFilterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return PrivateIPAddressesFilter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return PrivateIPAddressesFilter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return PrivateIPAddressesFilter.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.cs new file mode 100644 index 000000000000..84d9ae6ff74a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Private Ip Addresses filter + public partial class PrivateIPAddressesFilter : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilterInternal + { + + /// Backing field for property. + private string _subnetId; + + /// Subnet OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubnetId { get => this._subnetId; set => this._subnetId = value; } + + /// Backing field for property. + private string _vnicId; + + /// VCN OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string VnicId { get => this._vnicId; set => this._vnicId = value; } + + /// Creates an new instance. + public PrivateIPAddressesFilter() + { + + } + } + /// Private Ip Addresses filter + public partial interface IPrivateIPAddressesFilter : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Subnet OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subnet OCID", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + string SubnetId { get; set; } + /// VCN OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"VCN OCID", + SerializedName = @"vnicId", + PossibleTypes = new [] { typeof(string) })] + string VnicId { get; set; } + + } + /// Private Ip Addresses filter + internal partial interface IPrivateIPAddressesFilterInternal + + { + /// Subnet OCID + string SubnetId { get; set; } + /// VCN OCID + string VnicId { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.json.cs new file mode 100644 index 000000000000..c1bbdcf6ba92 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/PrivateIPAddressesFilter.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Private Ip Addresses filter + public partial class PrivateIPAddressesFilter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new PrivateIPAddressesFilter(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal PrivateIPAddressesFilter(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subnetId = If( json?.PropertyT("subnetId"), out var __jsonSubnetId) ? (string)__jsonSubnetId : (string)SubnetId;} + {_vnicId = If( json?.PropertyT("vnicId"), out var __jsonVnicId) ? (string)__jsonVnicId : (string)VnicId;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subnetId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subnetId.ToString()) : null, "subnetId" ,container.Add ); + AddIf( null != (((object)this._vnicId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._vnicId.ToString()) : null, "vnicId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.PowerShell.cs new file mode 100644 index 000000000000..ec4a4400cead --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.PowerShell.cs @@ -0,0 +1,214 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + [System.ComponentModel.TypeConverter(typeof(ProfileTypeTypeConverter))] + public partial class ProfileType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProfileType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProfileType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProfileType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConsumerGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).ConsumerGroup = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup?) content.GetValueForProperty("ConsumerGroup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).ConsumerGroup, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).HostFormat = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType) content.GetValueForProperty("HostFormat",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).HostFormat, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType.CreateFrom); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Protocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Protocol = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Protocol, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType.CreateFrom); + } + if (content.Contains("SessionMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SessionMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType) content.GetValueForProperty("SessionMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SessionMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType.CreateFrom); + } + if (content.Contains("SyntaxFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SyntaxFormat = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType) content.GetValueForProperty("SyntaxFormat",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SyntaxFormat, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType.CreateFrom); + } + if (content.Contains("TlsAuthentication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).TlsAuthentication = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType?) content.GetValueForProperty("TlsAuthentication",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).TlsAuthentication, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType.CreateFrom); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProfileType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ConsumerGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).ConsumerGroup = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup?) content.GetValueForProperty("ConsumerGroup",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).ConsumerGroup, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup.CreateFrom); + } + if (content.Contains("DisplayName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).DisplayName = (string) content.GetValueForProperty("DisplayName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).DisplayName, global::System.Convert.ToString); + } + if (content.Contains("HostFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).HostFormat = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType) content.GetValueForProperty("HostFormat",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).HostFormat, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType.CreateFrom); + } + if (content.Contains("IsRegional")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).IsRegional = (bool?) content.GetValueForProperty("IsRegional",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).IsRegional, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Protocol")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Protocol = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Protocol, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType.CreateFrom); + } + if (content.Contains("SessionMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SessionMode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType) content.GetValueForProperty("SessionMode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SessionMode, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType.CreateFrom); + } + if (content.Contains("SyntaxFormat")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SyntaxFormat = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType) content.GetValueForProperty("SyntaxFormat",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).SyntaxFormat, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType.CreateFrom); + } + if (content.Contains("TlsAuthentication")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).TlsAuthentication = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType?) content.GetValueForProperty("TlsAuthentication",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).TlsAuthentication, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType.CreateFrom); + } + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Value = (string) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal)this).Value, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + [System.ComponentModel.TypeConverter(typeof(ProfileTypeTypeConverter))] + public partial interface IProfileType + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.TypeConverter.cs new file mode 100644 index 000000000000..29a1da5e6c11 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProfileTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProfileType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProfileType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProfileType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.cs new file mode 100644 index 000000000000..63758a634ac0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.cs @@ -0,0 +1,213 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class ProfileType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileTypeInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup? _consumerGroup; + + /// Consumer group used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup? ConsumerGroup { get => this._consumerGroup; set => this._consumerGroup = value; } + + /// Backing field for property. + private string _displayName; + + /// A user-friendly name for the connection. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string DisplayName { get => this._displayName; set => this._displayName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType _hostFormat; + + /// Host format used in connection string. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType HostFormat { get => this._hostFormat; set => this._hostFormat = value; } + + /// Backing field for property. + private bool? _isRegional; + + /// True for a regional connection string, applicable to cross-region DG only. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsRegional { get => this._isRegional; set => this._isRegional = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType _protocol; + + /// Protocol used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType Protocol { get => this._protocol; set => this._protocol = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType _sessionMode; + + /// + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType SessionMode { get => this._sessionMode; set => this._sessionMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType _syntaxFormat; + + /// + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) + /// format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType SyntaxFormat { get => this._syntaxFormat; set => this._syntaxFormat = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType? _tlsAuthentication; + + /// + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType? TlsAuthentication { get => this._tlsAuthentication; set => this._tlsAuthentication = value; } + + /// Backing field for property. + private string _value; + + /// Connection string value. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public ProfileType() + { + + } + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + public partial interface IProfileType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Consumer group used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Consumer group used by the connection.", + SerializedName = @"consumerGroup", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup? ConsumerGroup { get; set; } + /// A user-friendly name for the connection. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A user-friendly name for the connection.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + string DisplayName { get; set; } + /// Host format used in connection string. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Host format used in connection string.", + SerializedName = @"hostFormat", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType HostFormat { get; set; } + /// True for a regional connection string, applicable to cross-region DG only. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True for a regional connection string, applicable to cross-region DG only.", + SerializedName = @"isRegional", + PossibleTypes = new [] { typeof(bool) })] + bool? IsRegional { get; set; } + /// Protocol used by the connection. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Protocol used by the connection.", + SerializedName = @"protocol", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType Protocol { get; set; } + /// + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies whether the listener performs a direct hand-off of the session, or redirects the session.", + SerializedName = @"sessionMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType SessionMode { get; set; } + /// + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) + /// format. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) format.", + SerializedName = @"syntaxFormat", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType SyntaxFormat { get; set; } + /// + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication.", + SerializedName = @"tlsAuthentication", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType? TlsAuthentication { get; set; } + /// Connection string value. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Connection string value.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(string) })] + string Value { get; set; } + + } + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + internal partial interface IProfileTypeInternal + + { + /// Consumer group used by the connection. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup? ConsumerGroup { get; set; } + /// A user-friendly name for the connection. + string DisplayName { get; set; } + /// Host format used in connection string. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType HostFormat { get; set; } + /// True for a regional connection string, applicable to cross-region DG only. + bool? IsRegional { get; set; } + /// Protocol used by the connection. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType Protocol { get; set; } + /// + /// Specifies whether the listener performs a direct hand-off of the session, or redirects the session. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType SessionMode { get; set; } + /// + /// Specifies whether the connection string is using the long (LONG), Easy Connect (EZCONNECT), or Easy Connect Plus (EZCONNECTPLUS) + /// format. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType SyntaxFormat { get; set; } + /// + /// Specifies whether the TLS handshake is using one-way (SERVER) or mutual (MUTUAL) authentication. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType? TlsAuthentication { get; set; } + /// Connection string value. + string Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.json.cs new file mode 100644 index 000000000000..d7cace1853be --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ProfileType.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The connection string profile to allow clients to group, filter and select connection string values based on structured + /// metadata. + /// + public partial class ProfileType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IProfileType FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ProfileType(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ProfileType(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_consumerGroup = If( json?.PropertyT("consumerGroup"), out var __jsonConsumerGroup) ? (string)__jsonConsumerGroup : (string)ConsumerGroup;} + {_displayName = If( json?.PropertyT("displayName"), out var __jsonDisplayName) ? (string)__jsonDisplayName : (string)DisplayName;} + {_hostFormat = If( json?.PropertyT("hostFormat"), out var __jsonHostFormat) ? (string)__jsonHostFormat : (string)HostFormat;} + {_isRegional = If( json?.PropertyT("isRegional"), out var __jsonIsRegional) ? (bool?)__jsonIsRegional : IsRegional;} + {_protocol = If( json?.PropertyT("protocol"), out var __jsonProtocol) ? (string)__jsonProtocol : (string)Protocol;} + {_sessionMode = If( json?.PropertyT("sessionMode"), out var __jsonSessionMode) ? (string)__jsonSessionMode : (string)SessionMode;} + {_syntaxFormat = If( json?.PropertyT("syntaxFormat"), out var __jsonSyntaxFormat) ? (string)__jsonSyntaxFormat : (string)SyntaxFormat;} + {_tlsAuthentication = If( json?.PropertyT("tlsAuthentication"), out var __jsonTlsAuthentication) ? (string)__jsonTlsAuthentication : (string)TlsAuthentication;} + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? (string)__jsonValue : (string)Value;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._consumerGroup)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._consumerGroup.ToString()) : null, "consumerGroup" ,container.Add ); + AddIf( null != (((object)this._displayName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._displayName.ToString()) : null, "displayName" ,container.Add ); + AddIf( null != (((object)this._hostFormat)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._hostFormat.ToString()) : null, "hostFormat" ,container.Add ); + AddIf( null != this._isRegional ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isRegional) : null, "isRegional" ,container.Add ); + AddIf( null != (((object)this._protocol)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._protocol.ToString()) : null, "protocol" ,container.Add ); + AddIf( null != (((object)this._sessionMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._sessionMode.ToString()) : null, "sessionMode" ,container.Add ); + AddIf( null != (((object)this._syntaxFormat)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._syntaxFormat.ToString()) : null, "syntaxFormat" ,container.Add ); + AddIf( null != (((object)this._tlsAuthentication)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._tlsAuthentication.ToString()) : null, "tlsAuthentication" ,container.Add ); + AddIf( null != (((object)this._value)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._value.ToString()) : null, "value" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.PowerShell.cs new file mode 100644 index 000000000000..d90129bcc4f5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.PowerShell.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + /// + [System.ComponentModel.TypeConverter(typeof(RemoveVirtualMachineFromExadbVMClusterDetailsTypeConverter))] + public partial class RemoveVirtualMachineFromExadbVMClusterDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RemoveVirtualMachineFromExadbVMClusterDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RemoveVirtualMachineFromExadbVMClusterDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RemoveVirtualMachineFromExadbVMClusterDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetailsInternal)this).DbNode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[]) content.GetValueForProperty("DbNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetailsInternal)this).DbNode, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeDetailsTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RemoveVirtualMachineFromExadbVMClusterDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DbNode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetailsInternal)this).DbNode = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[]) content.GetValueForProperty("DbNode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetailsInternal)this).DbNode, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeDetailsTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + [System.ComponentModel.TypeConverter(typeof(RemoveVirtualMachineFromExadbVMClusterDetailsTypeConverter))] + public partial interface IRemoveVirtualMachineFromExadbVMClusterDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.TypeConverter.cs new file mode 100644 index 000000000000..79a9ceff85a5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RemoveVirtualMachineFromExadbVMClusterDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RemoveVirtualMachineFromExadbVMClusterDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RemoveVirtualMachineFromExadbVMClusterDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RemoveVirtualMachineFromExadbVMClusterDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.cs new file mode 100644 index 000000000000..da9e8b5bcd03 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + /// + public partial class RemoveVirtualMachineFromExadbVMClusterDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetailsInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[] _dbNode; + + /// + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[] DbNode { get => this._dbNode; set => this._dbNode = value; } + + /// + /// Creates an new instance. + /// + public RemoveVirtualMachineFromExadbVMClusterDetails() + { + + } + } + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + public partial interface IRemoveVirtualMachineFromExadbVMClusterDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed.", + SerializedName = @"dbNodes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[] DbNode { get; set; } + + } + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + internal partial interface IRemoveVirtualMachineFromExadbVMClusterDetailsInternal + + { + /// + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[] DbNode { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.json.cs new file mode 100644 index 000000000000..9ed6e23e5f61 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RemoveVirtualMachineFromExadbVMClusterDetails.json.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + /// + public partial class RemoveVirtualMachineFromExadbVMClusterDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new RemoveVirtualMachineFromExadbVMClusterDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal RemoveVirtualMachineFromExadbVMClusterDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dbNode = If( json?.PropertyT("dbNodes"), out var __jsonDbNodes) ? If( __jsonDbNodes as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeDetails.FromJson(__u) )) ))() : null : DbNode;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._dbNode) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._dbNode ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("dbNodes",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.PowerShell.cs new file mode 100644 index 000000000000..70833ea7c993 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Details to restore an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(RestoreAutonomousDatabaseDetailsTypeConverter))] + public partial class RestoreAutonomousDatabaseDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RestoreAutonomousDatabaseDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RestoreAutonomousDatabaseDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal RestoreAutonomousDatabaseDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Timestamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp = (global::System.DateTime) content.GetValueForProperty("Timestamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal RestoreAutonomousDatabaseDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Timestamp")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp = (global::System.DateTime) content.GetValueForProperty("Timestamp",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetailsInternal)this).Timestamp, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Details to restore an Oracle Autonomous Database. + [System.ComponentModel.TypeConverter(typeof(RestoreAutonomousDatabaseDetailsTypeConverter))] + public partial interface IRestoreAutonomousDatabaseDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.TypeConverter.cs new file mode 100644 index 000000000000..ba03db286116 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RestoreAutonomousDatabaseDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RestoreAutonomousDatabaseDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RestoreAutonomousDatabaseDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RestoreAutonomousDatabaseDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.cs new file mode 100644 index 000000000000..d83b78e9ae9f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Details to restore an Oracle Autonomous Database. + public partial class RestoreAutonomousDatabaseDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetailsInternal + { + + /// Backing field for property. + private global::System.DateTime _timestamp; + + /// The time to restore the database to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime Timestamp { get => this._timestamp; set => this._timestamp = value; } + + /// Creates an new instance. + public RestoreAutonomousDatabaseDetails() + { + + } + } + /// Details to restore an Oracle Autonomous Database. + public partial interface IRestoreAutonomousDatabaseDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The time to restore the database to. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The time to restore the database to.", + SerializedName = @"timestamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime Timestamp { get; set; } + + } + /// Details to restore an Oracle Autonomous Database. + internal partial interface IRestoreAutonomousDatabaseDetailsInternal + + { + /// The time to restore the database to. + global::System.DateTime Timestamp { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.json.cs new file mode 100644 index 000000000000..ff5b1cc10da1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/RestoreAutonomousDatabaseDetails.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Details to restore an Oracle Autonomous Database. + public partial class RestoreAutonomousDatabaseDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new RestoreAutonomousDatabaseDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal RestoreAutonomousDatabaseDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_timestamp = If( json?.PropertyT("timestamp"), out var __jsonTimestamp) ? global::System.DateTime.TryParse((string)__jsonTimestamp, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimestampValue) ? __jsonTimestampValue : Timestamp : Timestamp;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timestamp.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)), "timestamp" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.PowerShell.cs new file mode 100644 index 000000000000..df47aba52cf4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// SaaS Subscription Details model + [System.ComponentModel.TypeConverter(typeof(SaasSubscriptionDetailsTypeConverter))] + public partial class SaasSubscriptionDetails + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SaasSubscriptionDetails(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SaasSubscriptionDetails(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SaasSubscriptionDetails(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SubscriptionName = (string) content.GetValueForProperty("SubscriptionName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SubscriptionName, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("OfferId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).OfferId = (string) content.GetValueForProperty("OfferId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).OfferId, global::System.Convert.ToString); + } + if (content.Contains("PlanId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PlanId, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus = (string) content.GetValueForProperty("SaasSubscriptionStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus, global::System.Convert.ToString); + } + if (content.Contains("PublisherId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PublisherId = (string) content.GetValueForProperty("PublisherId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PublisherId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserEmailId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId = (string) content.GetValueForProperty("PurchaserEmailId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId = (string) content.GetValueForProperty("PurchaserTenantId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("IsAutoRenew")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsAutoRenew = (bool?) content.GetValueForProperty("IsAutoRenew",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsAutoRenew, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTrial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsFreeTrial = (bool?) content.GetValueForProperty("IsFreeTrial",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsFreeTrial, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SaasSubscriptionDetails(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("SubscriptionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SubscriptionName = (string) content.GetValueForProperty("SubscriptionName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SubscriptionName, global::System.Convert.ToString); + } + if (content.Contains("TimeCreated")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TimeCreated = (global::System.DateTime?) content.GetValueForProperty("TimeCreated",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TimeCreated, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("OfferId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).OfferId = (string) content.GetValueForProperty("OfferId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).OfferId, global::System.Convert.ToString); + } + if (content.Contains("PlanId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PlanId = (string) content.GetValueForProperty("PlanId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PlanId, global::System.Convert.ToString); + } + if (content.Contains("SaasSubscriptionStatus")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus = (string) content.GetValueForProperty("SaasSubscriptionStatus",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).SaasSubscriptionStatus, global::System.Convert.ToString); + } + if (content.Contains("PublisherId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PublisherId = (string) content.GetValueForProperty("PublisherId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PublisherId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserEmailId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId = (string) content.GetValueForProperty("PurchaserEmailId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserEmailId, global::System.Convert.ToString); + } + if (content.Contains("PurchaserTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId = (string) content.GetValueForProperty("PurchaserTenantId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).PurchaserTenantId, global::System.Convert.ToString); + } + if (content.Contains("TermUnit")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TermUnit = (string) content.GetValueForProperty("TermUnit",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).TermUnit, global::System.Convert.ToString); + } + if (content.Contains("IsAutoRenew")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsAutoRenew = (bool?) content.GetValueForProperty("IsAutoRenew",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsAutoRenew, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IsFreeTrial")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsFreeTrial = (bool?) content.GetValueForProperty("IsFreeTrial",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal)this).IsFreeTrial, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// SaaS Subscription Details model + [System.ComponentModel.TypeConverter(typeof(SaasSubscriptionDetailsTypeConverter))] + public partial interface ISaasSubscriptionDetails + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.TypeConverter.cs new file mode 100644 index 000000000000..0d338715af08 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SaasSubscriptionDetailsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SaasSubscriptionDetails.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SaasSubscriptionDetails.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SaasSubscriptionDetails.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.cs new file mode 100644 index 000000000000..9a5ecbfcbb5c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.cs @@ -0,0 +1,274 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// SaaS Subscription Details model + public partial class SaasSubscriptionDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal + { + + /// Backing field for property. + private string _id; + + /// Purchased SaaS subscription ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Backing field for property. + private bool? _isAutoRenew; + + /// AutoRenew flag + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsAutoRenew { get => this._isAutoRenew; } + + /// Backing field for property. + private bool? _isFreeTrial; + + /// FreeTrial flag + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsFreeTrial { get => this._isFreeTrial; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for IsAutoRenew + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.IsAutoRenew { get => this._isAutoRenew; set { {_isAutoRenew = value;} } } + + /// Internal Acessors for IsFreeTrial + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.IsFreeTrial { get => this._isFreeTrial; set { {_isFreeTrial = value;} } } + + /// Internal Acessors for OfferId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.OfferId { get => this._offerId; set { {_offerId = value;} } } + + /// Internal Acessors for PlanId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.PlanId { get => this._planId; set { {_planId = value;} } } + + /// Internal Acessors for PublisherId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.PublisherId { get => this._publisherId; set { {_publisherId = value;} } } + + /// Internal Acessors for PurchaserEmailId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.PurchaserEmailId { get => this._purchaserEmailId; set { {_purchaserEmailId = value;} } } + + /// Internal Acessors for PurchaserTenantId + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.PurchaserTenantId { get => this._purchaserTenantId; set { {_purchaserTenantId = value;} } } + + /// Internal Acessors for SaasSubscriptionStatus + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.SaasSubscriptionStatus { get => this._saasSubscriptionStatus; set { {_saasSubscriptionStatus = value;} } } + + /// Internal Acessors for SubscriptionName + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.SubscriptionName { get => this._subscriptionName; set { {_subscriptionName = value;} } } + + /// Internal Acessors for TermUnit + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.TermUnit { get => this._termUnit; set { {_termUnit = value;} } } + + /// Internal Acessors for TimeCreated + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetailsInternal.TimeCreated { get => this._timeCreated; set { {_timeCreated = value;} } } + + /// Backing field for property. + private string _offerId; + + /// Purchased offer ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string OfferId { get => this._offerId; } + + /// Backing field for property. + private string _planId; + + /// Purchased offer's plan ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PlanId { get => this._planId; } + + /// Backing field for property. + private string _publisherId; + + /// Publisher ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PublisherId { get => this._publisherId; } + + /// Backing field for property. + private string _purchaserEmailId; + + /// Purchaser Email ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PurchaserEmailId { get => this._purchaserEmailId; } + + /// Backing field for property. + private string _purchaserTenantId; + + /// Purchaser Tenant ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PurchaserTenantId { get => this._purchaserTenantId; } + + /// Backing field for property. + private string _saasSubscriptionStatus; + + /// Indicates the status of the Subscription. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SaasSubscriptionStatus { get => this._saasSubscriptionStatus; } + + /// Backing field for property. + private string _subscriptionName; + + /// SaaS subscription name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubscriptionName { get => this._subscriptionName; } + + /// Backing field for property. + private string _termUnit; + + /// Purchase Term Unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string TermUnit { get => this._termUnit; } + + /// Backing field for property. + private global::System.DateTime? _timeCreated; + + /// Creation Date and Time + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeCreated { get => this._timeCreated; } + + /// Creates an new instance. + public SaasSubscriptionDetails() + { + + } + } + /// SaaS Subscription Details model + public partial interface ISaasSubscriptionDetails : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Purchased SaaS subscription ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Purchased SaaS subscription ID", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// AutoRenew flag + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"AutoRenew flag", + SerializedName = @"isAutoRenew", + PossibleTypes = new [] { typeof(bool) })] + bool? IsAutoRenew { get; } + /// FreeTrial flag + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"FreeTrial flag", + SerializedName = @"isFreeTrial", + PossibleTypes = new [] { typeof(bool) })] + bool? IsFreeTrial { get; } + /// Purchased offer ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Purchased offer ID", + SerializedName = @"offerId", + PossibleTypes = new [] { typeof(string) })] + string OfferId { get; } + /// Purchased offer's plan ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Purchased offer's plan ID", + SerializedName = @"planId", + PossibleTypes = new [] { typeof(string) })] + string PlanId { get; } + /// Publisher ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Publisher ID", + SerializedName = @"publisherId", + PossibleTypes = new [] { typeof(string) })] + string PublisherId { get; } + /// Purchaser Email ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Purchaser Email ID", + SerializedName = @"purchaserEmailId", + PossibleTypes = new [] { typeof(string) })] + string PurchaserEmailId { get; } + /// Purchaser Tenant ID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Purchaser Tenant ID", + SerializedName = @"purchaserTenantId", + PossibleTypes = new [] { typeof(string) })] + string PurchaserTenantId { get; } + /// Indicates the status of the Subscription. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Indicates the status of the Subscription.", + SerializedName = @"saasSubscriptionStatus", + PossibleTypes = new [] { typeof(string) })] + string SaasSubscriptionStatus { get; } + /// SaaS subscription name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"SaaS subscription name", + SerializedName = @"subscriptionName", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionName { get; } + /// Purchase Term Unit + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Purchase Term Unit", + SerializedName = @"termUnit", + PossibleTypes = new [] { typeof(string) })] + string TermUnit { get; } + /// Creation Date and Time + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Creation Date and Time", + SerializedName = @"timeCreated", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeCreated { get; } + + } + /// SaaS Subscription Details model + internal partial interface ISaasSubscriptionDetailsInternal + + { + /// Purchased SaaS subscription ID + string Id { get; set; } + /// AutoRenew flag + bool? IsAutoRenew { get; set; } + /// FreeTrial flag + bool? IsFreeTrial { get; set; } + /// Purchased offer ID + string OfferId { get; set; } + /// Purchased offer's plan ID + string PlanId { get; set; } + /// Publisher ID + string PublisherId { get; set; } + /// Purchaser Email ID + string PurchaserEmailId { get; set; } + /// Purchaser Tenant ID + string PurchaserTenantId { get; set; } + /// Indicates the status of the Subscription. + string SaasSubscriptionStatus { get; set; } + /// SaaS subscription name + string SubscriptionName { get; set; } + /// Purchase Term Unit + string TermUnit { get; set; } + /// Creation Date and Time + global::System.DateTime? TimeCreated { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.json.cs new file mode 100644 index 000000000000..683d0d6c8481 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SaasSubscriptionDetails.json.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// SaaS Subscription Details model + public partial class SaasSubscriptionDetails + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new SaasSubscriptionDetails(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal SaasSubscriptionDetails(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_subscriptionName = If( json?.PropertyT("subscriptionName"), out var __jsonSubscriptionName) ? (string)__jsonSubscriptionName : (string)SubscriptionName;} + {_timeCreated = If( json?.PropertyT("timeCreated"), out var __jsonTimeCreated) ? global::System.DateTime.TryParse((string)__jsonTimeCreated, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeCreatedValue) ? __jsonTimeCreatedValue : TimeCreated : TimeCreated;} + {_offerId = If( json?.PropertyT("offerId"), out var __jsonOfferId) ? (string)__jsonOfferId : (string)OfferId;} + {_planId = If( json?.PropertyT("planId"), out var __jsonPlanId) ? (string)__jsonPlanId : (string)PlanId;} + {_saasSubscriptionStatus = If( json?.PropertyT("saasSubscriptionStatus"), out var __jsonSaasSubscriptionStatus) ? (string)__jsonSaasSubscriptionStatus : (string)SaasSubscriptionStatus;} + {_publisherId = If( json?.PropertyT("publisherId"), out var __jsonPublisherId) ? (string)__jsonPublisherId : (string)PublisherId;} + {_purchaserEmailId = If( json?.PropertyT("purchaserEmailId"), out var __jsonPurchaserEmailId) ? (string)__jsonPurchaserEmailId : (string)PurchaserEmailId;} + {_purchaserTenantId = If( json?.PropertyT("purchaserTenantId"), out var __jsonPurchaserTenantId) ? (string)__jsonPurchaserTenantId : (string)PurchaserTenantId;} + {_termUnit = If( json?.PropertyT("termUnit"), out var __jsonTermUnit) ? (string)__jsonTermUnit : (string)TermUnit;} + {_isAutoRenew = If( json?.PropertyT("isAutoRenew"), out var __jsonIsAutoRenew) ? (bool?)__jsonIsAutoRenew : IsAutoRenew;} + {_isFreeTrial = If( json?.PropertyT("isFreeTrial"), out var __jsonIsFreeTrial) ? (bool?)__jsonIsFreeTrial : IsFreeTrial;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._subscriptionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subscriptionName.ToString()) : null, "subscriptionName" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeCreated ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeCreated?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeCreated" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._offerId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._offerId.ToString()) : null, "offerId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._planId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._planId.ToString()) : null, "planId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._saasSubscriptionStatus)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._saasSubscriptionStatus.ToString()) : null, "saasSubscriptionStatus" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._publisherId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._publisherId.ToString()) : null, "publisherId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._purchaserEmailId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._purchaserEmailId.ToString()) : null, "purchaserEmailId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._purchaserTenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._purchaserTenantId.ToString()) : null, "purchaserTenantId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._termUnit)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._termUnit.ToString()) : null, "termUnit" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isAutoRenew ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isAutoRenew) : null, "isAutoRenew" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isFreeTrial ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isFreeTrial) : null, "isFreeTrial" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.PowerShell.cs new file mode 100644 index 000000000000..b16a3283ab21 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeTypeConverter))] + public partial class ScheduledOperationsType + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScheduledOperationsType(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScheduledOperationsType(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScheduledOperationsType(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ScheduledOperationsType(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeTypeConverter))] + public partial interface IScheduledOperationsType + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.TypeConverter.cs new file mode 100644 index 000000000000..17083075e831 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduledOperationsTypeTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ScheduledOperationsType.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ScheduledOperationsType.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ScheduledOperationsType.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.cs new file mode 100644 index 000000000000..cd7a8a01bdab --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek _dayOfWeek; + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeek()); set => this._dayOfWeek = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekInternal)DayOfWeek).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekInternal)DayOfWeek).Name = value ; } + + /// Internal Acessors for DayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeInternal.DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeek()); set { {_dayOfWeek = value;} } } + + /// Backing field for property. + private string _scheduledStartTime; + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScheduledStartTime { get => this._scheduledStartTime; set => this._scheduledStartTime = value; } + + /// Backing field for property. + private string _scheduledStopTime; + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScheduledStopTime { get => this._scheduledStopTime; set => this._scheduledStopTime = value; } + + /// Creates an new instance. + public ScheduledOperationsType() + { + + } + } + /// The list of scheduled operations. + public partial interface IScheduledOperationsType : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStopTime { get; set; } + + } + /// The list of scheduled operations. + internal partial interface IScheduledOperationsTypeInternal + + { + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek DayOfWeek { get; set; } + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledStopTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.json.cs new file mode 100644 index 000000000000..a38105179b5c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsType.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsType + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsType FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ScheduledOperationsType(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ScheduledOperationsType(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dayOfWeek = If( json?.PropertyT("dayOfWeek"), out var __jsonDayOfWeek) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeek.FromJson(__jsonDayOfWeek) : DayOfWeek;} + {_scheduledStartTime = If( json?.PropertyT("scheduledStartTime"), out var __jsonScheduledStartTime) ? (string)__jsonScheduledStartTime : (string)ScheduledStartTime;} + {_scheduledStopTime = If( json?.PropertyT("scheduledStopTime"), out var __jsonScheduledStopTime) ? (string)__jsonScheduledStopTime : (string)ScheduledStopTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dayOfWeek ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._dayOfWeek.ToJson(null,serializationMode) : null, "dayOfWeek" ,container.Add ); + AddIf( null != (((object)this._scheduledStartTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scheduledStartTime.ToString()) : null, "scheduledStartTime" ,container.Add ); + AddIf( null != (((object)this._scheduledStopTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scheduledStopTime.ToString()) : null, "scheduledStopTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.PowerShell.cs new file mode 100644 index 000000000000..e6b8559be2f1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeUpdateTypeConverter))] + public partial class ScheduledOperationsTypeUpdate + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ScheduledOperationsTypeUpdate(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ScheduledOperationsTypeUpdate(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ScheduledOperationsTypeUpdate(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ScheduledOperationsTypeUpdate(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DayOfWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate) content.GetValueForProperty("DayOfWeek",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeek, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdateTypeConverter.ConvertFrom); + } + if (content.Contains("ScheduledStartTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime = (string) content.GetValueForProperty("ScheduledStartTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStartTime, global::System.Convert.ToString); + } + if (content.Contains("ScheduledStopTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime = (string) content.GetValueForProperty("ScheduledStopTime",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).ScheduledStopTime, global::System.Convert.ToString); + } + if (content.Contains("DayOfWeekName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName?) content.GetValueForProperty("DayOfWeekName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal)this).DayOfWeekName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName.CreateFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The list of scheduled operations. + [System.ComponentModel.TypeConverter(typeof(ScheduledOperationsTypeUpdateTypeConverter))] + public partial interface IScheduledOperationsTypeUpdate + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.TypeConverter.cs new file mode 100644 index 000000000000..f3209bac6119 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ScheduledOperationsTypeUpdateTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ScheduledOperationsTypeUpdate.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ScheduledOperationsTypeUpdate.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ScheduledOperationsTypeUpdate.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.cs new file mode 100644 index 000000000000..895fd0b90eb2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsTypeUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate _dayOfWeek; + + /// Day of week + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdate()); set => this._dayOfWeek = value; } + + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdateInternal)DayOfWeek).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdateInternal)DayOfWeek).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); } + + /// Internal Acessors for DayOfWeek + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdateInternal.DayOfWeek { get => (this._dayOfWeek = this._dayOfWeek ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdate()); set { {_dayOfWeek = value;} } } + + /// Backing field for property. + private string _scheduledStartTime; + + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScheduledStartTime { get => this._scheduledStartTime; set => this._scheduledStartTime = value; } + + /// Backing field for property. + private string _scheduledStopTime; + + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ScheduledStopTime { get => this._scheduledStopTime; set => this._scheduledStopTime = value; } + + /// Creates an new instance. + public ScheduledOperationsTypeUpdate() + { + + } + } + /// The list of scheduled operations. + public partial interface IScheduledOperationsTypeUpdate : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Name of the day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + string ScheduledStopTime { get; set; } + + } + /// The list of scheduled operations. + internal partial interface IScheduledOperationsTypeUpdateInternal + + { + /// Day of week + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeekUpdate DayOfWeek { get; set; } + /// Name of the day of the week. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName? DayOfWeekName { get; set; } + /// auto start time. value must be of ISO-8601 format HH:mm + string ScheduledStartTime { get; set; } + /// auto stop time. value must be of ISO-8601 format HH:mm + string ScheduledStopTime { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.json.cs new file mode 100644 index 000000000000..9f4608511a5d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ScheduledOperationsTypeUpdate.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The list of scheduled operations. + public partial class ScheduledOperationsTypeUpdate + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IScheduledOperationsTypeUpdate FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ScheduledOperationsTypeUpdate(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ScheduledOperationsTypeUpdate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_dayOfWeek = If( json?.PropertyT("dayOfWeek"), out var __jsonDayOfWeek) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DayOfWeekUpdate.FromJson(__jsonDayOfWeek) : DayOfWeek;} + {_scheduledStartTime = If( json?.PropertyT("scheduledStartTime"), out var __jsonScheduledStartTime) ? (string)__jsonScheduledStartTime : (string)ScheduledStartTime;} + {_scheduledStopTime = If( json?.PropertyT("scheduledStopTime"), out var __jsonScheduledStopTime) ? (string)__jsonScheduledStopTime : (string)ScheduledStopTime;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._dayOfWeek ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._dayOfWeek.ToJson(null,serializationMode) : null, "dayOfWeek" ,container.Add ); + AddIf( null != (((object)this._scheduledStartTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scheduledStartTime.ToString()) : null, "scheduledStartTime" ,container.Add ); + AddIf( null != (((object)this._scheduledStopTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._scheduledStopTime.ToString()) : null, "scheduledStopTime" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.PowerShell.cs new file mode 100644 index 000000000000..6ce6470b41f3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// SystemVersion resource Definition + [System.ComponentModel.TypeConverter(typeof(SystemVersionTypeConverter))] + public partial class SystemVersion + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersion(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersion(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersion(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PropertiesSystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).PropertiesSystemVersion = (string) content.GetValueForProperty("PropertiesSystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).PropertiesSystemVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersion(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PropertiesSystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).PropertiesSystemVersion = (string) content.GetValueForProperty("PropertiesSystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal)this).PropertiesSystemVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// SystemVersion resource Definition + [System.ComponentModel.TypeConverter(typeof(SystemVersionTypeConverter))] + public partial interface ISystemVersion + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.TypeConverter.cs new file mode 100644 index 000000000000..d1f6fe177dfb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersion.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersion.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersion.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.cs new file mode 100644 index 000000000000..d93c681a1b3d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// SystemVersion resource Definition + public partial class SystemVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionProperties()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string PropertiesSystemVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionPropertiesInternal)Property).SystemVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionPropertiesInternal)Property).SystemVersion = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionProperties()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public SystemVersion() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// SystemVersion resource Definition + public partial interface ISystemVersion : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A valid Oracle System Version", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string PropertiesSystemVersion { get; set; } + + } + /// SystemVersion resource Definition + internal partial interface ISystemVersionInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// A valid Oracle System Version + string PropertiesSystemVersion { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties Property { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.json.cs new file mode 100644 index 000000000000..0af04fff5a03 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersion.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// SystemVersion resource Definition + public partial class SystemVersion + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new SystemVersion(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersion(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.PowerShell.cs new file mode 100644 index 000000000000..d12fa7de42f1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a SystemVersion list operation. + [System.ComponentModel.TypeConverter(typeof(SystemVersionListResultTypeConverter))] + public partial class SystemVersionListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersionListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersionListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersionListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersionListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The response of a SystemVersion list operation. + [System.ComponentModel.TypeConverter(typeof(SystemVersionListResultTypeConverter))] + public partial interface ISystemVersionListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.TypeConverter.cs new file mode 100644 index 000000000000..5fc7daf7af0f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersionListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersionListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersionListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.cs new file mode 100644 index 000000000000..66347f8ee180 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a SystemVersion list operation. + public partial class SystemVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion[] _value; + + /// The SystemVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public SystemVersionListResult() + { + + } + } + /// The response of a SystemVersion list operation. + public partial interface ISystemVersionListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The SystemVersion items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The SystemVersion items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion[] Value { get; set; } + + } + /// The response of a SystemVersion list operation. + internal partial interface ISystemVersionListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The SystemVersion items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.json.cs new file mode 100644 index 000000000000..38b8741a2082 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a SystemVersion list operation. + public partial class SystemVersionListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new SystemVersionListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersionListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersion.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.PowerShell.cs new file mode 100644 index 000000000000..201ebe42171e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.PowerShell.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// System Version Resource model + [System.ComponentModel.TypeConverter(typeof(SystemVersionPropertiesTypeConverter))] + public partial class SystemVersionProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersionProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersionProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersionProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersionProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionPropertiesInternal)this).SystemVersion = (string) content.GetValueForProperty("SystemVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionPropertiesInternal)this).SystemVersion, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// System Version Resource model + [System.ComponentModel.TypeConverter(typeof(SystemVersionPropertiesTypeConverter))] + public partial interface ISystemVersionProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.TypeConverter.cs new file mode 100644 index 000000000000..e68c21daeb65 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersionProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersionProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersionProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.cs new file mode 100644 index 000000000000..4f7cddf712ed --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// System Version Resource model + public partial class SystemVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionPropertiesInternal + { + + /// Backing field for property. + private string _systemVersion; + + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SystemVersion { get => this._systemVersion; set => this._systemVersion = value; } + + /// Creates an new instance. + public SystemVersionProperties() + { + + } + } + /// System Version Resource model + public partial interface ISystemVersionProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// A valid Oracle System Version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A valid Oracle System Version", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + string SystemVersion { get; set; } + + } + /// System Version Resource model + internal partial interface ISystemVersionPropertiesInternal + + { + /// A valid Oracle System Version + string SystemVersion { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.json.cs new file mode 100644 index 000000000000..77f062573fa3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionProperties.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// System Version Resource model + public partial class SystemVersionProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new SystemVersionProperties(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersionProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemVersion = If( json?.PropertyT("systemVersion"), out var __jsonSystemVersion) ? (string)__jsonSystemVersion : (string)SystemVersion;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._systemVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._systemVersion.ToString()) : null, "systemVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.PowerShell.cs new file mode 100644 index 000000000000..5a0f477bd6d3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.PowerShell.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// SystemVersions filter + [System.ComponentModel.TypeConverter(typeof(SystemVersionsFilterTypeConverter))] + public partial class SystemVersionsFilter + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemVersionsFilter(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemVersionsFilter(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemVersionsFilter(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("IsLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).IsLatestVersion = (bool?) content.GetValueForProperty("IsLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).IsLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemVersionsFilter(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GiVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).GiVersion = (string) content.GetValueForProperty("GiVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).GiVersion, global::System.Convert.ToString); + } + if (content.Contains("Shape")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).Shape = (string) content.GetValueForProperty("Shape",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).Shape, global::System.Convert.ToString); + } + if (content.Contains("IsLatestVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).IsLatestVersion = (bool?) content.GetValueForProperty("IsLatestVersion",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal)this).IsLatestVersion, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// SystemVersions filter + [System.ComponentModel.TypeConverter(typeof(SystemVersionsFilterTypeConverter))] + public partial interface ISystemVersionsFilter + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.TypeConverter.cs new file mode 100644 index 000000000000..c55b445edb86 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemVersionsFilterTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemVersionsFilter.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemVersionsFilter.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemVersionsFilter.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.cs new file mode 100644 index 000000000000..d3ad34688a9f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// SystemVersions filter + public partial class SystemVersionsFilter : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilterInternal + { + + /// Backing field for property. + private string _giVersion; + + /// Grid Infrastructure version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string GiVersion { get => this._giVersion; set => this._giVersion = value; } + + /// Backing field for property. + private bool? _isLatestVersion; + + /// Check If we have to list only latest versions + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsLatestVersion { get => this._isLatestVersion; set => this._isLatestVersion = value; } + + /// Backing field for property. + private string _shape; + + /// Exadata shape + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Shape { get => this._shape; set => this._shape = value; } + + /// Creates an new instance. + public SystemVersionsFilter() + { + + } + } + /// SystemVersions filter + public partial interface ISystemVersionsFilter : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Grid Infrastructure version + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Grid Infrastructure version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + string GiVersion { get; set; } + /// Check If we have to list only latest versions + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Check If we have to list only latest versions", + SerializedName = @"isLatestVersion", + PossibleTypes = new [] { typeof(bool) })] + bool? IsLatestVersion { get; set; } + /// Exadata shape + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Exadata shape", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + string Shape { get; set; } + + } + /// SystemVersions filter + internal partial interface ISystemVersionsFilterInternal + + { + /// Grid Infrastructure version + string GiVersion { get; set; } + /// Check If we have to list only latest versions + bool? IsLatestVersion { get; set; } + /// Exadata shape + string Shape { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.json.cs new file mode 100644 index 000000000000..0d2cc15570b9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/SystemVersionsFilter.json.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// SystemVersions filter + public partial class SystemVersionsFilter + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionsFilter FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new SystemVersionsFilter(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal SystemVersionsFilter(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_giVersion = If( json?.PropertyT("giVersion"), out var __jsonGiVersion) ? (string)__jsonGiVersion : (string)GiVersion;} + {_shape = If( json?.PropertyT("shape"), out var __jsonShape) ? (string)__jsonShape : (string)Shape;} + {_isLatestVersion = If( json?.PropertyT("isLatestVersion"), out var __jsonIsLatestVersion) ? (bool?)__jsonIsLatestVersion : IsLatestVersion;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._giVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._giVersion.ToString()) : null, "giVersion" ,container.Add ); + AddIf( null != (((object)this._shape)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._shape.ToString()) : null, "shape" ,container.Add ); + AddIf( null != this._isLatestVersion ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isLatestVersion) : null, "isLatestVersion" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.PowerShell.cs new file mode 100644 index 000000000000..8c04965e7b7a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// validation error + [System.ComponentModel.TypeConverter(typeof(ValidationErrorTypeConverter))] + public partial class ValidationError + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidationError(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidationError(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidationError(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidationError(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// validation error + [System.ComponentModel.TypeConverter(typeof(ValidationErrorTypeConverter))] + public partial interface IValidationError + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.TypeConverter.cs new file mode 100644 index 000000000000..9971bdac895b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidationErrorTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidationError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidationError.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidationError.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.cs new file mode 100644 index 000000000000..fa984a15b862 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// validation error + public partial class ValidationError : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal + { + + /// Backing field for property. + private string _code; + + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Code { get => this._code; set => this._code = value; } + + /// Backing field for property. + private string _message; + + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Message { get => this._message; set => this._message = value; } + + /// Creates an new instance. + public ValidationError() + { + + } + } + /// validation error + public partial interface IValidationError : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"error code", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"error message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + + } + /// validation error + internal partial interface IValidationErrorInternal + + { + /// error code + string Code { get; set; } + /// error message + string Message { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.json.cs new file mode 100644 index 000000000000..1964f16aa223 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationError.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// validation error + public partial class ValidationError + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ValidationError(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ValidationError(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.PowerShell.cs new file mode 100644 index 000000000000..6ed740cade9a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// validation result + [System.ComponentModel.TypeConverter(typeof(ValidationResultTypeConverter))] + public partial class ValidationResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ValidationResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ValidationResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ValidationResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus.CreateFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ValidationResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationErrorTypeConverter.ConvertFrom); + } + if (content.Contains("Status")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus.CreateFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal)this).Message, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// validation result + [System.ComponentModel.TypeConverter(typeof(ValidationResultTypeConverter))] + public partial interface IValidationResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.TypeConverter.cs new file mode 100644 index 000000000000..6826131dbea0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ValidationResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ValidationResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ValidationResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ValidationResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.cs new file mode 100644 index 000000000000..18f5a0f08bb1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.cs @@ -0,0 +1,94 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// validation result + public partial class ValidationResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal + { + + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)Error).Code = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError _error; + + /// validation error + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationError()); set => this._error = value; } + + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationErrorInternal)Error).Message = value ; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationError()); set { {_error = value;} } } + + /// Internal Acessors for Status + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResultInternal.Status { get => this._status; set { {_status = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus _status; + + /// validation status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus Status { get => this._status; } + + /// Creates an new instance. + public ValidationResult() + { + + } + } + /// validation result + public partial interface IValidationResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// error code + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"error code", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; set; } + /// error message + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"error message", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; set; } + /// validation status + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = true, + Description = @"validation status", + SerializedName = @"status", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus Status { get; } + + } + /// validation result + internal partial interface IValidationResultInternal + + { + /// error code + string Code { get; set; } + /// validation error + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationError Error { get; set; } + /// error message + string Message { get; set; } + /// validation status + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus Status { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.json.cs new file mode 100644 index 000000000000..ce15704acbc4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/ValidationResult.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// validation result + public partial class ValidationResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IValidationResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ValidationResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._status)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._status.ToString()) : null, "status" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ValidationResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ValidationError.FromJson(__jsonError) : Error;} + {_status = If( json?.PropertyT("status"), out var __jsonStatus) ? (string)__jsonStatus : (string)Status;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.PowerShell.cs new file mode 100644 index 000000000000..acc3f372ebd1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.PowerShell.cs @@ -0,0 +1,306 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Virtual IP resource belonging to a vm cluster resource. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressTypeConverter))] + public partial class VirtualNetworkAddress + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualNetworkAddress(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualNetworkAddress(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualNetworkAddress(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState.CreateFrom); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualNetworkAddress(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState.CreateFrom); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + } + /// Virtual IP resource belonging to a vm cluster resource. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressTypeConverter))] + public partial interface IVirtualNetworkAddress + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.TypeConverter.cs new file mode 100644 index 000000000000..03efb51655a6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualNetworkAddressTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualNetworkAddress.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualNetworkAddress.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualNetworkAddress.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.cs new file mode 100644 index 000000000000..fc5c835dcc21 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.cs @@ -0,0 +1,309 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Virtual IP resource belonging to a vm cluster resource. + public partial class VirtualNetworkAddress : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Domain { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).Domain; } + + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string IPAddress { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).IPAddress; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).IPAddress = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleDetail; } + + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleState; } + + /// Internal Acessors for Domain + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal.Domain { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).Domain; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).Domain = value; } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal.LifecycleDetail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleDetail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleDetail = value; } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal.LifecycleState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).LifecycleState = value; } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal.Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).Ocid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).Ocid = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for TimeAssigned + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal.TimeAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).TimeAssigned; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).TimeAssigned = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Ocid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).Ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties _property; + + /// The resource-specific properties for this resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressProperties()); set => this._property = value; } + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).ProvisioningState; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? TimeAssigned { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).TimeAssigned; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string VMOcid { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).VMOcid; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)Property).VMOcid = value ?? null; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + + /// Creates an new instance. + public VirtualNetworkAddress() + { + + } + } + /// Virtual IP resource belonging to a vm cluster resource. + public partial interface IVirtualNetworkAddress : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Virtual network address fully qualified domain name.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; } + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual network Address address.", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state of the application virtual IP (VIP) address.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"virtual network address lifecycle state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? LifecycleState { get; } + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Application VIP OCID.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when the create operation for the application virtual IP (VIP) address completed.", + SerializedName = @"timeAssigned", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAssigned { get; } + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual Machine OCID.", + SerializedName = @"vmOcid", + PossibleTypes = new [] { typeof(string) })] + string VMOcid { get; set; } + + } + /// Virtual IP resource belonging to a vm cluster resource. + internal partial interface IVirtualNetworkAddressInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + string AzureAsyncOperation { get; set; } + /// Virtual network address fully qualified domain name. + string Domain { get; set; } + /// Virtual network Address address. + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + string LifecycleDetail { get; set; } + /// virtual network address lifecycle state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? LifecycleState { get; set; } + /// Application VIP OCID. + string Ocid { get; set; } + /// The resource-specific properties for this resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties Property { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + + int? RetryAfter { get; set; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + global::System.DateTime? TimeAssigned { get; set; } + /// Virtual Machine OCID. + string VMOcid { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.json.cs new file mode 100644 index 000000000000..4473c5014bb4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddress.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Virtual IP resource belonging to a vm cluster resource. + public partial class VirtualNetworkAddress + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new VirtualNetworkAddress(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualNetworkAddress(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressProperties.FromJson(__jsonProperties) : Property;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.PowerShell.cs new file mode 100644 index 000000000000..821e8cd495d0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The response of a VirtualNetworkAddress list operation. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressListResultTypeConverter))] + public partial class VirtualNetworkAddressListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualNetworkAddressListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualNetworkAddressListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualNetworkAddressListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualNetworkAddressListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The response of a VirtualNetworkAddress list operation. + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressListResultTypeConverter))] + public partial interface IVirtualNetworkAddressListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.TypeConverter.cs new file mode 100644 index 000000000000..9956f44254fe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualNetworkAddressListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualNetworkAddressListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualNetworkAddressListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualNetworkAddressListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.cs new file mode 100644 index 000000000000..7b29b56af36f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a VirtualNetworkAddress list operation. + public partial class VirtualNetworkAddressListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResultInternal + { + + /// Backing field for property. + private string _nextLink; + + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; set => this._nextLink = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress[] _value; + + /// The VirtualNetworkAddress items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public VirtualNetworkAddressListResult() + { + + } + } + /// The response of a VirtualNetworkAddress list operation. + public partial interface IVirtualNetworkAddressListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The link to the next page of items + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The link to the next page of items", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; set; } + /// The VirtualNetworkAddress items on this page + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The VirtualNetworkAddress items on this page", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress[] Value { get; set; } + + } + /// The response of a VirtualNetworkAddress list operation. + internal partial interface IVirtualNetworkAddressListResultInternal + + { + /// The link to the next page of items + string NextLink { get; set; } + /// The VirtualNetworkAddress items on this page + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.json.cs new file mode 100644 index 000000000000..e34bc462c4e0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressListResult.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The response of a VirtualNetworkAddress list operation. + public partial class VirtualNetworkAddressListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new VirtualNetworkAddressListResult(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualNetworkAddressListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddress.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.PowerShell.cs new file mode 100644 index 000000000000..ff8d9de34c57 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.PowerShell.cs @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// virtualNetworkAddress resource properties + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressPropertiesTypeConverter))] + public partial class VirtualNetworkAddressProperties + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualNetworkAddressProperties(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualNetworkAddressProperties(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualNetworkAddressProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState.CreateFrom); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualNetworkAddressProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("VMOcid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).VMOcid = (string) content.GetValueForProperty("VMOcid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).VMOcid, global::System.Convert.ToString); + } + if (content.Contains("Ocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Ocid = (string) content.GetValueForProperty("Ocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Ocid, global::System.Convert.ToString); + } + if (content.Contains("Domain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).Domain, global::System.Convert.ToString); + } + if (content.Contains("LifecycleDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail = (string) content.GetValueForProperty("LifecycleDetail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleDetail, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState.CreateFrom); + } + if (content.Contains("LifecycleState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState?) content.GetValueForProperty("LifecycleState",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).LifecycleState, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState.CreateFrom); + } + if (content.Contains("TimeAssigned")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned = (global::System.DateTime?) content.GetValueForProperty("TimeAssigned",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal)this).TimeAssigned, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + } + /// virtualNetworkAddress resource properties + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressPropertiesTypeConverter))] + public partial interface IVirtualNetworkAddressProperties + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.TypeConverter.cs new file mode 100644 index 000000000000..0bd3512ac2cc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.TypeConverter.cs @@ -0,0 +1,148 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualNetworkAddressPropertiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualNetworkAddressProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualNetworkAddressProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualNetworkAddressProperties.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.cs new file mode 100644 index 000000000000..3226e0a3a709 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// virtualNetworkAddress resource properties + public partial class VirtualNetworkAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal + { + + /// Backing field for property. + private string _domain; + + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Domain { get => this._domain; } + + /// Backing field for property. + private string _iPAddress; + + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string IPAddress { get => this._iPAddress; set => this._iPAddress = value; } + + /// Backing field for property. + private string _lifecycleDetail; + + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LifecycleDetail { get => this._lifecycleDetail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? _lifecycleState; + + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? LifecycleState { get => this._lifecycleState; } + + /// Internal Acessors for Domain + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal.Domain { get => this._domain; set { {_domain = value;} } } + + /// Internal Acessors for LifecycleDetail + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal.LifecycleDetail { get => this._lifecycleDetail; set { {_lifecycleDetail = value;} } } + + /// Internal Acessors for LifecycleState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal.LifecycleState { get => this._lifecycleState; set { {_lifecycleState = value;} } } + + /// Internal Acessors for Ocid + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal.Ocid { get => this._ocid; set { {_ocid = value;} } } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for TimeAssigned + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressPropertiesInternal.TimeAssigned { get => this._timeAssigned; set { {_timeAssigned = value;} } } + + /// Backing field for property. + private string _ocid; + + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Ocid { get => this._ocid; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? _provisioningState; + + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private global::System.DateTime? _timeAssigned; + + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? TimeAssigned { get => this._timeAssigned; } + + /// Backing field for property. + private string _vMOcid; + + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string VMOcid { get => this._vMOcid; set => this._vMOcid = value; } + + /// Creates an new instance. + public VirtualNetworkAddressProperties() + { + + } + } + /// virtualNetworkAddress resource properties + public partial interface IVirtualNetworkAddressProperties : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// Virtual network address fully qualified domain name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Virtual network address fully qualified domain name.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + string Domain { get; } + /// Virtual network Address address. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual network Address address.", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Additional information about the current lifecycle state of the application virtual IP (VIP) address.", + SerializedName = @"lifecycleDetails", + PossibleTypes = new [] { typeof(string) })] + string LifecycleDetail { get; } + /// virtual network address lifecycle state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"virtual network address lifecycle state.", + SerializedName = @"lifecycleState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? LifecycleState { get; } + /// Application VIP OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Application VIP OCID.", + SerializedName = @"ocid", + PossibleTypes = new [] { typeof(string) })] + string Ocid { get; } + /// Azure resource provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Azure resource provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The date and time when the create operation for the application virtual IP (VIP) address completed.", + SerializedName = @"timeAssigned", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? TimeAssigned { get; } + /// Virtual Machine OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual Machine OCID.", + SerializedName = @"vmOcid", + PossibleTypes = new [] { typeof(string) })] + string VMOcid { get; set; } + + } + /// virtualNetworkAddress resource properties + internal partial interface IVirtualNetworkAddressPropertiesInternal + + { + /// Virtual network address fully qualified domain name. + string Domain { get; set; } + /// Virtual network Address address. + string IPAddress { get; set; } + /// + /// Additional information about the current lifecycle state of the application virtual IP (VIP) address. + /// + string LifecycleDetail { get; set; } + /// virtual network address lifecycle state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState? LifecycleState { get; set; } + /// Application VIP OCID. + string Ocid { get; set; } + /// Azure resource provisioning state. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState? ProvisioningState { get; set; } + /// + /// The date and time when the create operation for the application virtual IP (VIP) address completed. + /// + global::System.DateTime? TimeAssigned { get; set; } + /// Virtual Machine OCID. + string VMOcid { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.json.cs new file mode 100644 index 000000000000..9820ef361b1a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api20250301/VirtualNetworkAddressProperties.json.cs @@ -0,0 +1,140 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// virtualNetworkAddress resource properties + public partial class VirtualNetworkAddressProperties + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new VirtualNetworkAddressProperties(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._iPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._iPAddress.ToString()) : null, "ipAddress" ,container.Add ); + AddIf( null != (((object)this._vMOcid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._vMOcid.ToString()) : null, "vmOcid" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._ocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._ocid.ToString()) : null, "ocid" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._domain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._domain.ToString()) : null, "domain" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleDetail)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleDetail.ToString()) : null, "lifecycleDetails" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provisioningState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provisioningState.ToString()) : null, "provisioningState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._lifecycleState)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lifecycleState.ToString()) : null, "lifecycleState" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._timeAssigned ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._timeAssigned?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "timeAssigned" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualNetworkAddressProperties(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_iPAddress = If( json?.PropertyT("ipAddress"), out var __jsonIPAddress) ? (string)__jsonIPAddress : (string)IPAddress;} + {_vMOcid = If( json?.PropertyT("vmOcid"), out var __jsonVMOcid) ? (string)__jsonVMOcid : (string)VMOcid;} + {_ocid = If( json?.PropertyT("ocid"), out var __jsonOcid) ? (string)__jsonOcid : (string)Ocid;} + {_domain = If( json?.PropertyT("domain"), out var __jsonDomain) ? (string)__jsonDomain : (string)Domain;} + {_lifecycleDetail = If( json?.PropertyT("lifecycleDetails"), out var __jsonLifecycleDetails) ? (string)__jsonLifecycleDetails : (string)LifecycleDetail;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + {_lifecycleState = If( json?.PropertyT("lifecycleState"), out var __jsonLifecycleState) ? (string)__jsonLifecycleState : (string)LifecycleState;} + {_timeAssigned = If( json?.PropertyT("timeAssigned"), out var __jsonTimeAssigned) ? global::System.DateTime.TryParse((string)__jsonTimeAssigned, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonTimeAssignedValue) ? __jsonTimeAssignedValue : TimeAssigned : TimeAssigned;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.PowerShell.cs new file mode 100644 index 000000000000..763d756fdaef --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial class ErrorAdditionalInfo + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorAdditionalInfo(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorAdditionalInfo(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorAdditionalInfo(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Info")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Info = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny) content.GetValueForProperty("Info",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal)this).Info, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.AnyTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The resource management error additional info. + [System.ComponentModel.TypeConverter(typeof(ErrorAdditionalInfoTypeConverter))] + public partial interface IErrorAdditionalInfo + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.TypeConverter.cs new file mode 100644 index 000000000000..9b3b89b616f8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorAdditionalInfoTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorAdditionalInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorAdditionalInfo.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.cs new file mode 100644 index 000000000000..4038d225fc02 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny _info; + + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Any()); } + + /// Internal Acessors for Info + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal.Info { get => (this._info = this._info ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Any()); set { {_info = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfoInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _type; + + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public ErrorAdditionalInfo() + { + + } + } + /// The resource management error additional info. + public partial interface IErrorAdditionalInfo : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The additional info. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info.", + SerializedName = @"info", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny Info { get; } + /// The additional info type. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The additional info type.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// The resource management error additional info. + internal partial interface IErrorAdditionalInfoInternal + + { + /// The additional info. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAny Info { get; set; } + /// The additional info type. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.json.cs new file mode 100644 index 000000000000..7804e3e0b89e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorAdditionalInfo.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The resource management error additional info. + public partial class ErrorAdditionalInfo + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorAdditionalInfo(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + {_info = If( json?.PropertyT("info"), out var __jsonInfo) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Any.FromJson(__jsonInfo) : Info;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ErrorAdditionalInfo(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._info ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._info.ToJson(null,serializationMode) : null, "info" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.PowerShell.cs new file mode 100644 index 000000000000..a5e623ea9826 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.PowerShell.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial class ErrorDetail + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorDetail(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorDetail(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorDetail(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The error detail. + [System.ComponentModel.TypeConverter(typeof(ErrorDetailTypeConverter))] + public partial interface IErrorDetail + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.TypeConverter.cs new file mode 100644 index 000000000000..30a1ec6fba16 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorDetailTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorDetail.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.cs new file mode 100644 index 000000000000..cb1446505be9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] _additionalInfo; + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] AdditionalInfo { get => this._additionalInfo; } + + /// Backing field for property. + private string _code; + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Code { get => this._code; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] _detail; + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Detail { get => this._detail; } + + /// Backing field for property. + private string _message; + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Message { get => this._message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal.AdditionalInfo { get => this._additionalInfo; set { {_additionalInfo = value;} } } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal.Code { get => this._code; set { {_code = value;} } } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal.Detail { get => this._detail; set { {_detail = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal.Message { get => this._message; set { {_message = value;} } } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal.Target { get => this._target; set { {_target = value;} } } + + /// Backing field for property. + private string _target; + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Target { get => this._target; } + + /// Creates an new instance. + public ErrorDetail() + { + + } + } + /// The error detail. + public partial interface IErrorDetail : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// The error detail. + internal partial interface IErrorDetailInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Detail { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.json.cs new file mode 100644 index 000000000000..6d9c7f7db78b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorDetail.json.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// The error detail. + public partial class ErrorDetail + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorDetail(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_code = If( json?.PropertyT("code"), out var __jsonCode) ? (string)__jsonCode : (string)Code;} + {_message = If( json?.PropertyT("message"), out var __jsonMessage) ? (string)__jsonMessage : (string)Message;} + {_target = If( json?.PropertyT("target"), out var __jsonTarget) ? (string)__jsonTarget : (string)Target;} + {_detail = If( json?.PropertyT("details"), out var __jsonDetails) ? If( __jsonDetails as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetail.FromJson(__u) )) ))() : null : Detail;} + {_additionalInfo = If( json?.PropertyT("additionalInfo"), out var __jsonAdditionalInfo) ? If( __jsonAdditionalInfo as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorAdditionalInfo.FromJson(__p) )) ))() : null : AdditionalInfo;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ErrorDetail(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._code)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._code.ToString()) : null, "code" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._message)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._message.ToString()) : null, "message" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._target)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._target.ToString()) : null, "target" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._detail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._detail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("details",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._additionalInfo) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __s in this._additionalInfo ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("additionalInfo",__r); + } + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.PowerShell.cs new file mode 100644 index 000000000000..12a282cd8f90 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.PowerShell.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial class ErrorResponse + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ErrorResponse(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ErrorResponse(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ErrorResponse(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Error")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetailTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetailTypeConverter.ConvertFrom)); + } + if (content.Contains("AdditionalInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).AdditionalInfo = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[]) content.GetValueForProperty("AdditionalInfo",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal)this).AdditionalInfo, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorAdditionalInfoTypeConverter.ConvertFrom)); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + [System.ComponentModel.TypeConverter(typeof(ErrorResponseTypeConverter))] + public partial interface IErrorResponse + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.TypeConverter.cs new file mode 100644 index 000000000000..abb596cc21da --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ErrorResponseTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ErrorResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ErrorResponse.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.cs new file mode 100644 index 000000000000..22c5cbdae7d3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal + { + + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).AdditionalInfo; } + + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Code; } + + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Detail; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail _error; + + /// The error object. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetail()); set => this._error = value; } + + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Message; } + + /// Internal Acessors for AdditionalInfo + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal.AdditionalInfo { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).AdditionalInfo; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).AdditionalInfo = value; } + + /// Internal Acessors for Code + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal.Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Code = value; } + + /// Internal Acessors for Detail + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal.Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Detail = value; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetail()); set { {_error = value;} } } + + /// Internal Acessors for Message + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal.Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Message = value; } + + /// Internal Acessors for Target + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponseInternal.Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Target = value; } + + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetailInternal)Error).Target; } + + /// Creates an new instance. + public ErrorResponse() + { + + } + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + public partial interface IErrorResponse : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The error additional info. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error additional info.", + SerializedName = @"additionalInfo", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] AdditionalInfo { get; } + /// The error code. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error code.", + SerializedName = @"code", + PossibleTypes = new [] { typeof(string) })] + string Code { get; } + /// The error details. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error details.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Detail { get; } + /// The error message. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error message.", + SerializedName = @"message", + PossibleTypes = new [] { typeof(string) })] + string Message { get; } + /// The error target. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The error target.", + SerializedName = @"target", + PossibleTypes = new [] { typeof(string) })] + string Target { get; } + + } + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + internal partial interface IErrorResponseInternal + + { + /// The error additional info. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorAdditionalInfo[] AdditionalInfo { get; set; } + /// The error code. + string Code { get; set; } + /// The error details. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail[] Detail { get; set; } + /// The error object. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorDetail Error { get; set; } + /// The error message. + string Message { get; set; } + /// The error target. + string Target { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.json.cs new file mode 100644 index 000000000000..da9045e062d3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ErrorResponse.json.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows + /// the OData error response format.). + /// + public partial class ErrorResponse + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ErrorResponse(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorDetail.FromJson(__jsonError) : Error;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ErrorResponse(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._error ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._error.ToJson(null,serializationMode) : null, "error" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.PowerShell.cs new file mode 100644 index 000000000000..b622cc74b111 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.PowerShell.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial class Operation + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Operation(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Operation(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Operation(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin.CreateFrom); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType.CreateFrom); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Operation(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Display")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationDisplayTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("IsDataAction")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).IsDataAction = (bool?) content.GetValueForProperty("IsDataAction",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).IsDataAction, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("Origin")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Origin = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin?) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).Origin, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin.CreateFrom); + } + if (content.Contains("ActionType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).ActionType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType?) content.GetValueForProperty("ActionType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).ActionType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType.CreateFrom); + } + if (content.Contains("DisplayProvider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayProvider, global::System.Convert.ToString); + } + if (content.Contains("DisplayResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayResource, global::System.Convert.ToString); + } + if (content.Contains("DisplayOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayOperation, global::System.Convert.ToString); + } + if (content.Contains("DisplayDescription")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal)this).DisplayDescription, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + [System.ComponentModel.TypeConverter(typeof(OperationTypeConverter))] + public partial interface IOperation + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.TypeConverter.cs new file mode 100644 index 000000000000..5f497dca5921 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Operation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Operation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Operation.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.cs new file mode 100644 index 000000000000..7a6450389a44 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.cs @@ -0,0 +1,256 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType? _actionType; + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType? ActionType { get => this._actionType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay _display; + + /// Localized display information for this particular operation. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationDisplay()); set => this._display = value; } + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Description; } + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Operation; } + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Provider; } + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Resource; } + + /// Backing field for property. + private bool? _isDataAction; + + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public bool? IsDataAction { get => this._isDataAction; } + + /// Internal Acessors for ActionType + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.ActionType { get => this._actionType; set { {_actionType = value;} } } + + /// Internal Acessors for Display + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationDisplay()); set { {_display = value;} } } + + /// Internal Acessors for DisplayDescription + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Description = value; } + + /// Internal Acessors for DisplayOperation + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Operation = value; } + + /// Internal Acessors for DisplayProvider + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Provider = value; } + + /// Internal Acessors for DisplayResource + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)Display).Resource = value; } + + /// Internal Acessors for IsDataAction + bool? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.IsDataAction { get => this._isDataAction; set { {_isDataAction = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Origin + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationInternal.Origin { get => this._origin; set { {_origin = value;} } } + + /// Backing field for property. + private string _name; + + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin? _origin; + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin? Origin { get => this._origin; } + + /// Creates an new instance. + public Operation() + { + + } + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + public partial interface IOperation : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Enum. Indicates the action type. ""Internal"" refers to actions that are for internal only APIs.", + SerializedName = @"actionType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType? ActionType { get; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string DisplayDescription { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string DisplayOperation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string DisplayProvider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string DisplayResource { get; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Whether the operation applies to data-plane. This is ""true"" for data-plane operations and ""false"" for ARM/control-plane operations.", + SerializedName = @"isDataAction", + PossibleTypes = new [] { typeof(bool) })] + bool? IsDataAction { get; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the operation, as per Resource-Based Access Control (RBAC). Examples: ""Microsoft.Compute/virtualMachines/write"", ""Microsoft.Compute/virtualMachines/capture/action""", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is ""user,system""", + SerializedName = @"origin", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin? Origin { get; } + + } + /// Details of a REST API operation, returned from the Resource Provider Operations API + internal partial interface IOperationInternal + + { + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType? ActionType { get; set; } + /// Localized display information for this particular operation. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay Display { get; set; } + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string DisplayDescription { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string DisplayOperation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string DisplayProvider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string DisplayResource { get; set; } + /// + /// Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for ARM/control-plane + /// operations. + /// + bool? IsDataAction { get; set; } + /// + /// The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", + /// "Microsoft.Compute/virtualMachines/capture/action" + /// + string Name { get; set; } + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin? Origin { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.json.cs new file mode 100644 index 000000000000..f5fe75e834e4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Operation.json.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Details of a REST API operation, returned from the Resource Provider Operations API + /// + public partial class Operation + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new Operation(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal Operation(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationDisplay.FromJson(__jsonDisplay) : Display;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_isDataAction = If( json?.PropertyT("isDataAction"), out var __jsonIsDataAction) ? (bool?)__jsonIsDataAction : IsDataAction;} + {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} + {_actionType = If( json?.PropertyT("actionType"), out var __jsonActionType) ? (string)__jsonActionType : (string)ActionType;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != this._display ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._display.ToJson(null,serializationMode) : null, "display" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._isDataAction ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonBoolean((bool)this._isDataAction) : null, "isDataAction" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._origin)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._origin.ToString()) : null, "origin" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._actionType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._actionType.ToString()) : null, "actionType" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.PowerShell.cs new file mode 100644 index 000000000000..16c6cb8170c6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial class OperationDisplay + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationDisplay(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationDisplay(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationDisplay(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationDisplay(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Provider")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Provider, global::System.Convert.ToString); + } + if (content.Contains("Resource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Resource, global::System.Convert.ToString); + } + if (content.Contains("Operation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Operation, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal)this).Description, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Localized display information for this particular operation. + [System.ComponentModel.TypeConverter(typeof(OperationDisplayTypeConverter))] + public partial interface IOperationDisplay + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.TypeConverter.cs new file mode 100644 index 000000000000..09ea7a3d0fa1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationDisplayTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationDisplay.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationDisplay.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.cs new file mode 100644 index 000000000000..9ed160c29e8e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal + { + + /// Backing field for property. + private string _description; + + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Description { get => this._description; } + + /// Internal Acessors for Description + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal.Description { get => this._description; set { {_description = value;} } } + + /// Internal Acessors for Operation + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + + /// Internal Acessors for Provider + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + + /// Internal Acessors for Resource + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + + /// Backing field for property. + private string _operation; + + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Operation { get => this._operation; } + + /// Backing field for property. + private string _provider; + + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Provider { get => this._provider; } + + /// Backing field for property. + private string _resource; + + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Resource { get => this._resource; } + + /// Creates an new instance. + public OperationDisplay() + { + + } + } + /// Localized display information for this particular operation. + public partial interface IOperationDisplay : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The short, localized friendly description of the operation; suitable for tool tips and detailed views.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The concise, localized friendly name for the operation; suitable for dropdowns. E.g. ""Create or Update Virtual Machine"", ""Restart Virtual Machine"".", + SerializedName = @"operation", + PossibleTypes = new [] { typeof(string) })] + string Operation { get; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The localized friendly form of the resource provider name, e.g. ""Microsoft Monitoring Insights"" or ""Microsoft Compute"".", + SerializedName = @"provider", + PossibleTypes = new [] { typeof(string) })] + string Provider { get; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The localized friendly name of the resource type related to this operation. E.g. ""Virtual Machines"" or ""Job Schedule Collections"".", + SerializedName = @"resource", + PossibleTypes = new [] { typeof(string) })] + string Resource { get; } + + } + /// Localized display information for this particular operation. + internal partial interface IOperationDisplayInternal + + { + /// + /// The short, localized friendly description of the operation; suitable for tool tips and detailed views. + /// + string Description { get; set; } + /// + /// The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual Machine", + /// "Restart Virtual Machine". + /// + string Operation { get; set; } + /// + /// The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft Compute". + /// + string Provider { get; set; } + /// + /// The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job Schedule Collections". + /// + string Resource { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.json.cs new file mode 100644 index 000000000000..17c0e3fea912 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationDisplay.json.cs @@ -0,0 +1,126 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Localized display information for this particular operation. + public partial class OperationDisplay + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OperationDisplay(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OperationDisplay(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_provider = If( json?.PropertyT("provider"), out var __jsonProvider) ? (string)__jsonProvider : (string)Provider;} + {_resource = If( json?.PropertyT("resource"), out var __jsonResource) ? (string)__jsonResource : (string)Resource;} + {_operation = If( json?.PropertyT("operation"), out var __jsonOperation) ? (string)__jsonOperation : (string)Operation;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._provider)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._provider.ToString()) : null, "provider" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._resource)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._resource.ToString()) : null, "resource" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._operation)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._operation.ToString()) : null, "operation" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.PowerShell.cs new file mode 100644 index 000000000000..e215a43516d5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.PowerShell.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial class OperationListResult + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OperationListResult(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OperationListResult(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OperationListResult(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OperationListResult(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Value")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal)this).NextLink, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] + public partial interface IOperationListResult + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.TypeConverter.cs new file mode 100644 index 000000000000..ef13e3290da8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OperationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OperationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OperationListResult.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.cs new file mode 100644 index 000000000000..73a6fe1ebae9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Internal Acessors for Value + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation[] Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string NextLink { get => this._nextLink; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation[] _value; + + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation[] Value { get => this._value; } + + /// Creates an new instance. + public OperationListResult() + { + + } + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + public partial interface IOperationListResult : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// URL to get the next set of operation list results (if there are any). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"URL to get the next set of operation list results (if there are any).", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// List of operations supported by the resource provider + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"List of operations supported by the resource provider", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation[] Value { get; } + + } + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + internal partial interface IOperationListResultInternal + + { + /// URL to get the next set of operation list results (if there are any). + string NextLink { get; set; } + /// List of operations supported by the resource provider + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.json.cs new file mode 100644 index 000000000000..cfadce5f332f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/OperationListResult.json.cs @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to get the next set of + /// results. + /// + public partial class OperationListResult + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_value = If( json?.PropertyT("value"), out var __jsonValue) ? If( __jsonValue as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Operation.FromJson(__u) )) ))() : null : Value;} + {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + if (null != this._value) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.XNodeArray(); + foreach( var __x in this._value ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("value",__w); + } + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nextLink)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._nextLink.ToString()) : null, "nextLink" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.PowerShell.cs new file mode 100644 index 000000000000..0b7a7c5e78d3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.PowerShell.cs @@ -0,0 +1,176 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Plan for the resource. + [System.ComponentModel.TypeConverter(typeof(PlanTypeConverter))] + public partial class Plan + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Plan(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Plan(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Plan(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Plan(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Publisher")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Publisher = (string) content.GetValueForProperty("Publisher",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Publisher, global::System.Convert.ToString); + } + if (content.Contains("Product")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Product = (string) content.GetValueForProperty("Product",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Product, global::System.Convert.ToString); + } + if (content.Contains("PromotionCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).PromotionCode = (string) content.GetValueForProperty("PromotionCode",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).PromotionCode, global::System.Convert.ToString); + } + if (content.Contains("Version")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Version = (string) content.GetValueForProperty("Version",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal)this).Version, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Plan for the resource. + [System.ComponentModel.TypeConverter(typeof(PlanTypeConverter))] + public partial interface IPlan + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.TypeConverter.cs new file mode 100644 index 000000000000..bd5244a52aeb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class PlanTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Plan.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Plan.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Plan.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.cs new file mode 100644 index 000000000000..fa50151467c5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Plan for the resource. + public partial class Plan : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlanInternal + { + + /// Backing field for property. + private string _name; + + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Name { get => this._name; set => this._name = value; } + + /// Backing field for property. + private string _product; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Product { get => this._product; set => this._product = value; } + + /// Backing field for property. + private string _promotionCode; + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string PromotionCode { get => this._promotionCode; set => this._promotionCode = value; } + + /// Backing field for property. + private string _publisher; + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Publisher { get => this._publisher; set => this._publisher = value; } + + /// Backing field for property. + private string _version; + + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Version { get => this._version; set => this._version = value; } + + /// Creates an new instance. + public Plan() + { + + } + } + /// Plan for the resource. + public partial interface IPlan : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// A user defined name of the 3rd Party Artifact that is being procured. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + string Publisher { get; set; } + /// The version of the desired product/artifact. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + string Version { get; set; } + + } + /// Plan for the resource. + internal partial interface IPlanInternal + + { + /// A user defined name of the 3rd Party Artifact that is being procured. + string Name { get; set; } + /// + /// 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. + /// + string Product { get; set; } + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + string PromotionCode { get; set; } + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + string Publisher { get; set; } + /// The version of the desired product/artifact. + string Version { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.json.cs new file mode 100644 index 000000000000..f21dadd03d42 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Plan.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Plan for the resource. + public partial class Plan + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IPlan FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new Plan(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal Plan(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_publisher = If( json?.PropertyT("publisher"), out var __jsonPublisher) ? (string)__jsonPublisher : (string)Publisher;} + {_product = If( json?.PropertyT("product"), out var __jsonProduct) ? (string)__jsonProduct : (string)Product;} + {_promotionCode = If( json?.PropertyT("promotionCode"), out var __jsonPromotionCode) ? (string)__jsonPromotionCode : (string)PromotionCode;} + {_version = If( json?.PropertyT("version"), out var __jsonVersion) ? (string)__jsonVersion : (string)Version;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + AddIf( null != (((object)this._publisher)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._publisher.ToString()) : null, "publisher" ,container.Add ); + AddIf( null != (((object)this._product)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._product.ToString()) : null, "product" ,container.Add ); + AddIf( null != (((object)this._promotionCode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._promotionCode.ToString()) : null, "promotionCode" ,container.Add ); + AddIf( null != (((object)this._version)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._version.ToString()) : null, "version" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.PowerShell.cs new file mode 100644 index 000000000000..a72ef917a9e6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.PowerShell.cs @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial class ProxyResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ProxyResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ProxyResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ProxyResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ProxyResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + [System.ComponentModel.TypeConverter(typeof(ProxyResourceTypeConverter))] + public partial interface IProxyResource + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.TypeConverter.cs new file mode 100644 index 000000000000..63b65718946a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ProxyResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ProxyResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ProxyResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.cs new file mode 100644 index 000000000000..77fd233bbdda --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public ProxyResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + public partial interface IProxyResource : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + + } + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + internal partial interface IProxyResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.json.cs new file mode 100644 index 000000000000..531e5872f731 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/ProxyResource.json.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location + /// + public partial class ProxyResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IProxyResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ProxyResource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ProxyResource(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.PowerShell.cs new file mode 100644 index 000000000000..5eff2e291a20 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.TypeConverter.cs new file mode 100644 index 000000000000..6a2068015a38 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Resource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Resource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Resource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.cs new file mode 100644 index 000000000000..f9821eae900e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.cs @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Backing field for property. + private string _type; + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + public partial interface IResource : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Fully qualified resource ID for the resource. E.g. ""/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}""", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.json.cs new file mode 100644 index 000000000000..9ad87987ac80 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/Resource.json.cs @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new Resource(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal Resource(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemData.FromJson(__jsonSystemData) : SystemData;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._name)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._name.ToString()) : null, "name" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.PowerShell.cs new file mode 100644 index 000000000000..22a540cea6e7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..d4998256f141 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.TypeConverter.cs @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.cs new file mode 100644 index 000000000000..4059baf69ccf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.cs @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.json.cs new file mode 100644 index 000000000000..df89ffecc15e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/SystemData.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new SystemData(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal SystemData(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..c7dad3c60e6f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.PowerShell.cs @@ -0,0 +1,236 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..acdd9fd532ee --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.cs new file mode 100644 index 000000000000..6f33092714d9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(); + + /// + /// Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type = value; } + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Name; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemData; } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTags()); set => this._tag = value; } + + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Inherited)] + public string Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// Validates that this object meets the validation criteria. + /// an instance that will receive validation + /// events. + /// + /// A that will be complete when validation is completed. + /// + public async global::System.Threading.Tasks.Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + await eventListener.AssertNotNull(nameof(__resource), __resource); + await eventListener.AssertObjectIsValid(nameof(__resource), __resource); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.json.cs new file mode 100644 index 000000000000..4256d645ef8d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResource.json.cs @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new TrackedResource(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + __resource?.ToJson(container, serializationMode); + AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal TrackedResource(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + __resource = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.PowerShell.cs new file mode 100644 index 000000000000..77b0e7fc4c36 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.PowerShell.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResourceTags(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResourceTags(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResourceTags(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..e241a01e29f0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.cs new file mode 100644 index 000000000000..9c81b94b580a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.dictionary.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.dictionary.cs new file mode 100644 index 000000000000..a62610bf492d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.TrackedResourceTags source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.json.cs new file mode 100644 index 000000000000..232dc3b87a3a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/Api50/TrackedResourceTags.json.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new TrackedResourceTags(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + /// + internal TrackedResourceTags(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IAssociativeArray)this).AdditionalProperties, null ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..0d1020674b7c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupsDeleteAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupsDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..e531f788599d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupsDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..2388225c2635 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabaseBackupsDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..051c435b2bac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupsDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..1c17d734ff3d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupsUpdateAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabaseBackupsUpdateAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..4f19dc7abd4c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabaseBackupsUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..fc6e9a1d5b1e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabaseBackupsUpdateAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..394adc54b930 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabaseBackupsUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabaseBackupsUpdateAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..0ed20964f467 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , + /// deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model + /// class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..9414855f0208 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null + /// if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null + /// if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..be4d95dc8ab6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..1cf4aae1f797 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabasesChangeDisasterRecoveryConfigurationAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of + /// as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..a04f6e21bf87 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesDeleteAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabasesDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabasesDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabasesDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabasesDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabasesDeleteAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabasesDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..3f48998588d3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasesDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabasesDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabasesDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabasesDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..3f6e41faf891 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabasesDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabasesDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabasesDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..ca1e63ffd41c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabasesDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabasesDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..10814101cc34 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesFailoverAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabasesFailoverAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabasesFailoverAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabasesFailoverAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabasesFailoverAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabasesFailoverAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesFailoverAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabasesFailoverAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..f7a64591504d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasesFailoverAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a + /// type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabasesFailoverAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabasesFailoverAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabasesFailoverAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..46c1ff0c9fd2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesFailoverAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabasesFailoverAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabasesFailoverAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabasesFailoverAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..858b7981db33 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesFailoverAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesFailoverAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabasesFailoverAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesFailoverAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabasesFailoverAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..2bf6dc94503f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesRestoreAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabasesRestoreAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabasesRestoreAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabasesRestoreAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabasesRestoreAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabasesRestoreAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesRestoreAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabasesRestoreAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..e0815874ae7f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasesRestoreAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabasesRestoreAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabasesRestoreAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabasesRestoreAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..748f544a0a65 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesRestoreAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabasesRestoreAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabasesRestoreAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabasesRestoreAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..5ee140cca7be --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesRestoreAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesRestoreAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabasesRestoreAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesRestoreAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabasesRestoreAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..06d2a665e664 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesShrinkAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabasesShrinkAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabasesShrinkAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabasesShrinkAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabasesShrinkAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabasesShrinkAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesShrinkAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabasesShrinkAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..4a316c94b11e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasesShrinkAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabasesShrinkAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabasesShrinkAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabasesShrinkAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..8cbca88234a2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesShrinkAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabasesShrinkAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabasesShrinkAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabasesShrinkAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..ba777d5250ee --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesShrinkAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesShrinkAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabasesShrinkAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesShrinkAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabasesShrinkAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..0be2e6dd659a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesSwitchoverAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabasesSwitchoverAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabasesSwitchoverAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabasesSwitchoverAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabasesSwitchoverAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabasesSwitchoverAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesSwitchoverAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabasesSwitchoverAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..9dc5d55c5651 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasesSwitchoverAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a + /// type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabasesSwitchoverAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabasesSwitchoverAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabasesSwitchoverAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..2b487c6c83ee --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesSwitchoverAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabasesSwitchoverAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabasesSwitchoverAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabasesSwitchoverAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..368f5515c507 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesSwitchoverAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesSwitchoverAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabasesSwitchoverAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesSwitchoverAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabasesSwitchoverAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..d10ad6db3163 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesUpdateAcceptedResponseHeadersTypeConverter))] + public partial class AutonomousDatabasesUpdateAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AutonomousDatabasesUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal AutonomousDatabasesUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AutonomousDatabasesUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AutonomousDatabasesUpdateAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(AutonomousDatabasesUpdateAcceptedResponseHeadersTypeConverter))] + public partial interface IAutonomousDatabasesUpdateAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..b6effff91ef3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AutonomousDatabasesUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AutonomousDatabasesUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AutonomousDatabasesUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AutonomousDatabasesUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..55a985d7ee19 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesUpdateAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public AutonomousDatabasesUpdateAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IAutonomousDatabasesUpdateAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IAutonomousDatabasesUpdateAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..5db27093b50f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/AutonomousDatabasesUpdateAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class AutonomousDatabasesUpdateAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal AutonomousDatabasesUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IAutonomousDatabasesUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AutonomousDatabasesUpdateAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..c6474003d141 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersTypeConverter))] + public partial class CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersTypeConverter))] + public partial interface ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..26e59b919f9b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if + /// there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if + /// there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..8afcf6fcbaaa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..3a98bc9e99ce --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructuresAddStorageCapacityAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a + /// . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..a8fd934e4e8d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructuresDeleteAcceptedResponseHeadersTypeConverter))] + public partial class CloudExadataInfrastructuresDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructuresDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructuresDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructuresDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructuresDeleteAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructuresDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..e97402e3aa9f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructuresDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..352faee578dd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudExadataInfrastructuresDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public CloudExadataInfrastructuresDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ICloudExadataInfrastructuresDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..809db8e602da --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudExadataInfrastructuresDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructuresDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructuresDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..99f8bd9a4e5a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructuresUpdateAcceptedResponseHeadersTypeConverter))] + public partial class CloudExadataInfrastructuresUpdateAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudExadataInfrastructuresUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudExadataInfrastructuresUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudExadataInfrastructuresUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudExadataInfrastructuresUpdateAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(CloudExadataInfrastructuresUpdateAcceptedResponseHeadersTypeConverter))] + public partial interface ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..d41b9c911959 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudExadataInfrastructuresUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no + /// suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..8d5f65f04c83 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudExadataInfrastructuresUpdateAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public CloudExadataInfrastructuresUpdateAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ICloudExadataInfrastructuresUpdateAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..e92e63b41dee --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudExadataInfrastructuresUpdateAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudExadataInfrastructuresUpdateAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudExadataInfrastructuresUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudExadataInfrastructuresUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudExadataInfrastructuresUpdateAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..47aa222e8bfc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersAddVmsAcceptedResponseHeadersTypeConverter))] + public partial class CloudVMClustersAddVmsAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClustersAddVmsAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClustersAddVmsAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClustersAddVmsAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClustersAddVmsAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersAddVmsAcceptedResponseHeadersTypeConverter))] + public partial interface ICloudVMClustersAddVmsAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..36bf4cdbac59 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClustersAddVmsAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClustersAddVmsAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClustersAddVmsAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClustersAddVmsAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..6bd0b5c57c8b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersAddVmsAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public CloudVMClustersAddVmsAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface ICloudVMClustersAddVmsAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ICloudVMClustersAddVmsAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..6bd2fe0e0017 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersAddVmsAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersAddVmsAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClustersAddVmsAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersAddVmsAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClustersAddVmsAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..48b7a214f5e6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersDeleteAcceptedResponseHeadersTypeConverter))] + public partial class CloudVMClustersDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClustersDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClustersDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClustersDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClustersDeleteAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface ICloudVMClustersDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..a73109d238b1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClustersDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClustersDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClustersDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClustersDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..e2bfe2beca23 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public CloudVMClustersDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface ICloudVMClustersDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ICloudVMClustersDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..9d6b6db0efe3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClustersDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClustersDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..50248335adca --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersRemoveVmsAcceptedResponseHeadersTypeConverter))] + public partial class CloudVMClustersRemoveVmsAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClustersRemoveVmsAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClustersRemoveVmsAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClustersRemoveVmsAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClustersRemoveVmsAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersRemoveVmsAcceptedResponseHeadersTypeConverter))] + public partial interface ICloudVMClustersRemoveVmsAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..2706fb05f2e2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClustersRemoveVmsAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClustersRemoveVmsAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClustersRemoveVmsAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClustersRemoveVmsAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..56263ace7e44 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersRemoveVmsAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public CloudVMClustersRemoveVmsAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface ICloudVMClustersRemoveVmsAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ICloudVMClustersRemoveVmsAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..1b111de24daf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersRemoveVmsAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersRemoveVmsAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClustersRemoveVmsAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersRemoveVmsAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClustersRemoveVmsAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..3502c9f098f4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersUpdateAcceptedResponseHeadersTypeConverter))] + public partial class CloudVMClustersUpdateAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CloudVMClustersUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal CloudVMClustersUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CloudVMClustersUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CloudVMClustersUpdateAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(CloudVMClustersUpdateAcceptedResponseHeadersTypeConverter))] + public partial interface ICloudVMClustersUpdateAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..87517ec1392d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CloudVMClustersUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CloudVMClustersUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CloudVMClustersUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CloudVMClustersUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..ce6a2a0b1db5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersUpdateAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public CloudVMClustersUpdateAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface ICloudVMClustersUpdateAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface ICloudVMClustersUpdateAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..36b11784658c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/CloudVMClustersUpdateAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class CloudVMClustersUpdateAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal CloudVMClustersUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.ICloudVMClustersUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new CloudVMClustersUpdateAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..ba2e801f549d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(DbNodesActionAcceptedResponseHeadersTypeConverter))] + public partial class DbNodesActionAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal DbNodesActionAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal DbNodesActionAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new DbNodesActionAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new DbNodesActionAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(DbNodesActionAcceptedResponseHeadersTypeConverter))] + public partial interface IDbNodesActionAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..6976afdd5f6b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,150 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class DbNodesActionAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return DbNodesActionAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return DbNodesActionAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return DbNodesActionAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..f0d7b07edf69 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class DbNodesActionAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// Creates an new instance. + public DbNodesActionAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IDbNodesActionAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IDbNodesActionAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..ee0ee5f0c5e9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/DbNodesActionAcceptedResponseHeaders.json.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class DbNodesActionAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal DbNodesActionAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IDbNodesActionAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new DbNodesActionAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..3aed3945ce58 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ExadbVMClustersDeleteAcceptedResponseHeadersTypeConverter))] + public partial class ExadbVMClustersDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClustersDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClustersDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClustersDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClustersDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ExadbVMClustersDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IExadbVMClustersDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..a7f973f1db39 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClustersDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClustersDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClustersDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClustersDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..5145f2596159 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExadbVMClustersDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public ExadbVMClustersDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IExadbVMClustersDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IExadbVMClustersDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..1daf4018cacd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExadbVMClustersDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClustersDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClustersDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..455f2b67326d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ExadbVMClustersRemoveVmsAcceptedResponseHeadersTypeConverter))] + public partial class ExadbVMClustersRemoveVmsAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClustersRemoveVmsAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClustersRemoveVmsAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClustersRemoveVmsAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClustersRemoveVmsAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ExadbVMClustersRemoveVmsAcceptedResponseHeadersTypeConverter))] + public partial interface IExadbVMClustersRemoveVmsAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..f442ae45314e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClustersRemoveVmsAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClustersRemoveVmsAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClustersRemoveVmsAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClustersRemoveVmsAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..b010fa4891cc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExadbVMClustersRemoveVmsAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public ExadbVMClustersRemoveVmsAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IExadbVMClustersRemoveVmsAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IExadbVMClustersRemoveVmsAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..4868978c9700 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersRemoveVmsAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExadbVMClustersRemoveVmsAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClustersRemoveVmsAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersRemoveVmsAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClustersRemoveVmsAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..33d90b1a0020 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ExadbVMClustersUpdateAcceptedResponseHeadersTypeConverter))] + public partial class ExadbVMClustersUpdateAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExadbVMClustersUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExadbVMClustersUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExadbVMClustersUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExadbVMClustersUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ExadbVMClustersUpdateAcceptedResponseHeadersTypeConverter))] + public partial interface IExadbVMClustersUpdateAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..c49a97d25bf3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExadbVMClustersUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExadbVMClustersUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExadbVMClustersUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExadbVMClustersUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..32a527a39bec --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExadbVMClustersUpdateAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public ExadbVMClustersUpdateAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IExadbVMClustersUpdateAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IExadbVMClustersUpdateAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..0a949bc27544 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExadbVMClustersUpdateAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExadbVMClustersUpdateAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExadbVMClustersUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExadbVMClustersUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExadbVMClustersUpdateAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..3bf4f1a61a62 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodesActionAcceptedResponseHeadersTypeConverter))] + public partial class ExascaleDbNodesActionAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbNodesActionAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbNodesActionAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbNodesActionAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbNodesActionAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ExascaleDbNodesActionAcceptedResponseHeadersTypeConverter))] + public partial interface IExascaleDbNodesActionAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..62ccd649d431 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbNodesActionAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbNodesActionAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbNodesActionAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbNodesActionAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..117f399b9119 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExascaleDbNodesActionAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public ExascaleDbNodesActionAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IExascaleDbNodesActionAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IExascaleDbNodesActionAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..ea19bcce15b2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbNodesActionAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExascaleDbNodesActionAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbNodesActionAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbNodesActionAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbNodesActionAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..abfbb20610a5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultsDeleteAcceptedResponseHeadersTypeConverter))] + public partial class ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultsDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..5f821cd334f7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageVaultsDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a + /// type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..5f5dc48a2b34 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IExascaleDbStorageVaultsDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..d90ffb4f01cf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageVaultsDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..418cc5d6ee08 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultsUpdateAcceptedResponseHeadersTypeConverter))] + public partial class ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(ExascaleDbStorageVaultsUpdateAcceptedResponseHeadersTypeConverter))] + public partial interface IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..a6defff78026 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExascaleDbStorageVaultsUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a + /// type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..52bed200221b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + /// Creates an new instance. + /// + public ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + } + public partial interface IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IExascaleDbStorageVaultsUpdateAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..dbc3cc4fd43c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IExascaleDbStorageVaultsUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new ExascaleDbStorageVaultsUpdateAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.PowerShell.cs new file mode 100644 index 000000000000..be7a8867d268 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.PowerShell.cs @@ -0,0 +1,331 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleDatabaseResourceManagerIdentityTypeConverter))] + public partial class OracleDatabaseResourceManagerIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleDatabaseResourceManagerIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleDatabaseResourceManagerIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json + /// string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleDatabaseResourceManagerIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdatabasename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdatabasename = (string) content.GetValueForProperty("Autonomousdatabasename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdatabasename, global::System.Convert.ToString); + } + if (content.Contains("Cloudexadatainfrastructurename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudexadatainfrastructurename = (string) content.GetValueForProperty("Cloudexadatainfrastructurename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudexadatainfrastructurename, global::System.Convert.ToString); + } + if (content.Contains("Cloudvmclustername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudvmclustername = (string) content.GetValueForProperty("Cloudvmclustername",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudvmclustername, global::System.Convert.ToString); + } + if (content.Contains("ExadbVMClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExadbVMClusterName = (string) content.GetValueForProperty("ExadbVMClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExadbVMClusterName, global::System.Convert.ToString); + } + if (content.Contains("ExascaleDbStorageVaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbStorageVaultName = (string) content.GetValueForProperty("ExascaleDbStorageVaultName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbStorageVaultName, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Adbscharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbscharsetname = (string) content.GetValueForProperty("Adbscharsetname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbscharsetname, global::System.Convert.ToString); + } + if (content.Contains("Adbsncharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbsncharsetname = (string) content.GetValueForProperty("Adbsncharsetname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbsncharsetname, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdbversionsname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdbversionsname = (string) content.GetValueForProperty("Autonomousdbversionsname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdbversionsname, global::System.Convert.ToString); + } + if (content.Contains("Dbsystemshapename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbsystemshapename = (string) content.GetValueForProperty("Dbsystemshapename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbsystemshapename, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivateviewocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivateviewocid = (string) content.GetValueForProperty("Dnsprivateviewocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivateviewocid, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivatezonename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivatezonename = (string) content.GetValueForProperty("Dnsprivatezonename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivatezonename, global::System.Convert.ToString); + } + if (content.Contains("FlexComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).FlexComponentName = (string) content.GetValueForProperty("FlexComponentName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).FlexComponentName, global::System.Convert.ToString); + } + if (content.Contains("Giversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Giversionname = (string) content.GetValueForProperty("Giversionname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Giversionname, global::System.Convert.ToString); + } + if (content.Contains("GiMinorVersionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).GiMinorVersionName = (string) content.GetValueForProperty("GiMinorVersionName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).GiMinorVersionName, global::System.Convert.ToString); + } + if (content.Contains("Systemversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Systemversionname = (string) content.GetValueForProperty("Systemversionname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Systemversionname, global::System.Convert.ToString); + } + if (content.Contains("Adbbackupid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbbackupid = (string) content.GetValueForProperty("Adbbackupid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbbackupid, global::System.Convert.ToString); + } + if (content.Contains("Dbserverocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbserverocid = (string) content.GetValueForProperty("Dbserverocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbserverocid, global::System.Convert.ToString); + } + if (content.Contains("Dbnodeocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbnodeocid = (string) content.GetValueForProperty("Dbnodeocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbnodeocid, global::System.Convert.ToString); + } + if (content.Contains("Virtualnetworkaddressname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Virtualnetworkaddressname = (string) content.GetValueForProperty("Virtualnetworkaddressname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Virtualnetworkaddressname, global::System.Convert.ToString); + } + if (content.Contains("ExascaleDbNodeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbNodeName = (string) content.GetValueForProperty("ExascaleDbNodeName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbNodeName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleDatabaseResourceManagerIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SubscriptionId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); + } + if (content.Contains("ResourceGroupName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdatabasename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdatabasename = (string) content.GetValueForProperty("Autonomousdatabasename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdatabasename, global::System.Convert.ToString); + } + if (content.Contains("Cloudexadatainfrastructurename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudexadatainfrastructurename = (string) content.GetValueForProperty("Cloudexadatainfrastructurename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudexadatainfrastructurename, global::System.Convert.ToString); + } + if (content.Contains("Cloudvmclustername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudvmclustername = (string) content.GetValueForProperty("Cloudvmclustername",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Cloudvmclustername, global::System.Convert.ToString); + } + if (content.Contains("ExadbVMClusterName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExadbVMClusterName = (string) content.GetValueForProperty("ExadbVMClusterName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExadbVMClusterName, global::System.Convert.ToString); + } + if (content.Contains("ExascaleDbStorageVaultName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbStorageVaultName = (string) content.GetValueForProperty("ExascaleDbStorageVaultName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbStorageVaultName, global::System.Convert.ToString); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("Adbscharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbscharsetname = (string) content.GetValueForProperty("Adbscharsetname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbscharsetname, global::System.Convert.ToString); + } + if (content.Contains("Adbsncharsetname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbsncharsetname = (string) content.GetValueForProperty("Adbsncharsetname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbsncharsetname, global::System.Convert.ToString); + } + if (content.Contains("Autonomousdbversionsname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdbversionsname = (string) content.GetValueForProperty("Autonomousdbversionsname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Autonomousdbversionsname, global::System.Convert.ToString); + } + if (content.Contains("Dbsystemshapename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbsystemshapename = (string) content.GetValueForProperty("Dbsystemshapename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbsystemshapename, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivateviewocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivateviewocid = (string) content.GetValueForProperty("Dnsprivateviewocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivateviewocid, global::System.Convert.ToString); + } + if (content.Contains("Dnsprivatezonename")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivatezonename = (string) content.GetValueForProperty("Dnsprivatezonename",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dnsprivatezonename, global::System.Convert.ToString); + } + if (content.Contains("FlexComponentName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).FlexComponentName = (string) content.GetValueForProperty("FlexComponentName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).FlexComponentName, global::System.Convert.ToString); + } + if (content.Contains("Giversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Giversionname = (string) content.GetValueForProperty("Giversionname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Giversionname, global::System.Convert.ToString); + } + if (content.Contains("GiMinorVersionName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).GiMinorVersionName = (string) content.GetValueForProperty("GiMinorVersionName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).GiMinorVersionName, global::System.Convert.ToString); + } + if (content.Contains("Systemversionname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Systemversionname = (string) content.GetValueForProperty("Systemversionname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Systemversionname, global::System.Convert.ToString); + } + if (content.Contains("Adbbackupid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbbackupid = (string) content.GetValueForProperty("Adbbackupid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Adbbackupid, global::System.Convert.ToString); + } + if (content.Contains("Dbserverocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbserverocid = (string) content.GetValueForProperty("Dbserverocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbserverocid, global::System.Convert.ToString); + } + if (content.Contains("Dbnodeocid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbnodeocid = (string) content.GetValueForProperty("Dbnodeocid",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Dbnodeocid, global::System.Convert.ToString); + } + if (content.Contains("Virtualnetworkaddressname")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Virtualnetworkaddressname = (string) content.GetValueForProperty("Virtualnetworkaddressname",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Virtualnetworkaddressname, global::System.Convert.ToString); + } + if (content.Contains("ExascaleDbNodeName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbNodeName = (string) content.GetValueForProperty("ExascaleDbNodeName",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).ExascaleDbNodeName, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal)this).Id, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(OracleDatabaseResourceManagerIdentityTypeConverter))] + public partial interface IOracleDatabaseResourceManagerIdentity + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.TypeConverter.cs new file mode 100644 index 000000000000..523ba298ba76 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.TypeConverter.cs @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleDatabaseResourceManagerIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise + /// false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + // we allow string conversion too. + if (type == typeof(global::System.String)) + { + return true; + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + // support direct string to id type conversion. + if (type == typeof(global::System.String)) + { + return new OracleDatabaseResourceManagerIdentity { Id = sourceValue }; + } + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleDatabaseResourceManagerIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleDatabaseResourceManagerIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleDatabaseResourceManagerIdentity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.cs new file mode 100644 index 000000000000..fa390d0a340c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleDatabaseResourceManagerIdentity : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentityInternal + { + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// Backing field for property. + private string _adbscharsetname; + + /// AutonomousDatabaseCharacterSet name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Adbscharsetname { get => this._adbscharsetname; set => this._adbscharsetname = value; } + + /// Backing field for property. + private string _adbsncharsetname; + + /// AutonomousDatabaseNationalCharacterSets name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Adbsncharsetname { get => this._adbsncharsetname; set => this._adbsncharsetname = value; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Backing field for property. + private string _autonomousdbversionsname; + + /// AutonomousDbVersion name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Autonomousdbversionsname { get => this._autonomousdbversionsname; set => this._autonomousdbversionsname = value; } + + /// Backing field for property. + private string _cloudexadatainfrastructurename; + + /// CloudExadataInfrastructure name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Cloudexadatainfrastructurename { get => this._cloudexadatainfrastructurename; set => this._cloudexadatainfrastructurename = value; } + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// Backing field for property. + private string _dbserverocid; + + /// DbServer OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Dbserverocid { get => this._dbserverocid; set => this._dbserverocid = value; } + + /// Backing field for property. + private string _dbsystemshapename; + + /// DbSystemShape name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Dbsystemshapename { get => this._dbsystemshapename; set => this._dbsystemshapename = value; } + + /// Backing field for property. + private string _dnsprivateviewocid; + + /// DnsPrivateView OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Dnsprivateviewocid { get => this._dnsprivateviewocid; set => this._dnsprivateviewocid = value; } + + /// Backing field for property. + private string _dnsprivatezonename; + + /// DnsPrivateZone name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Dnsprivatezonename { get => this._dnsprivatezonename; set => this._dnsprivatezonename = value; } + + /// Backing field for property. + private string _exadbVMClusterName; + + /// The name of the ExadbVmCluster + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ExadbVMClusterName { get => this._exadbVMClusterName; set => this._exadbVMClusterName = value; } + + /// Backing field for property. + private string _exascaleDbNodeName; + + /// The name of the ExascaleDbNode + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ExascaleDbNodeName { get => this._exascaleDbNodeName; set => this._exascaleDbNodeName = value; } + + /// Backing field for property. + private string _exascaleDbStorageVaultName; + + /// The name of the ExascaleDbStorageVault + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ExascaleDbStorageVaultName { get => this._exascaleDbStorageVaultName; set => this._exascaleDbStorageVaultName = value; } + + /// Backing field for property. + private string _flexComponentName; + + /// The name of the FlexComponent + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string FlexComponentName { get => this._flexComponentName; set => this._flexComponentName = value; } + + /// Backing field for property. + private string _giMinorVersionName; + + /// The name of the GiMinorVersion + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string GiMinorVersionName { get => this._giMinorVersionName; set => this._giMinorVersionName = value; } + + /// Backing field for property. + private string _giversionname; + + /// GiVersion name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Giversionname { get => this._giversionname; set => this._giversionname = value; } + + /// Backing field for property. + private string _id; + + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Id { get => this._id; set => this._id = value; } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _systemversionname; + + /// SystemVersion name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Systemversionname { get => this._systemversionname; set => this._systemversionname = value; } + + /// Backing field for property. + private string _virtualnetworkaddressname; + + /// Virtual IP address hostname. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Virtualnetworkaddressname { get => this._virtualnetworkaddressname; set => this._virtualnetworkaddressname = value; } + + /// Creates an new instance. + public OracleDatabaseResourceManagerIdentity() + { + + } + } + public partial interface IOracleDatabaseResourceManagerIdentity : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable + { + /// AutonomousDatabaseBackup id + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + string Adbbackupid { get; set; } + /// AutonomousDatabaseCharacterSet name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"AutonomousDatabaseCharacterSet name", + SerializedName = @"adbscharsetname", + PossibleTypes = new [] { typeof(string) })] + string Adbscharsetname { get; set; } + /// AutonomousDatabaseNationalCharacterSets name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"AutonomousDatabaseNationalCharacterSets name", + SerializedName = @"adbsncharsetname", + PossibleTypes = new [] { typeof(string) })] + string Adbsncharsetname { get; set; } + /// The database name. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + string Autonomousdatabasename { get; set; } + /// AutonomousDbVersion name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"AutonomousDbVersion name", + SerializedName = @"autonomousdbversionsname", + PossibleTypes = new [] { typeof(string) })] + string Autonomousdbversionsname { get; set; } + /// CloudExadataInfrastructure name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + string Cloudexadatainfrastructurename { get; set; } + /// CloudVmCluster name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + string Cloudvmclustername { get; set; } + /// DbNode OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + string Dbnodeocid { get; set; } + /// DbServer OCID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DbServer OCID.", + SerializedName = @"dbserverocid", + PossibleTypes = new [] { typeof(string) })] + string Dbserverocid { get; set; } + /// DbSystemShape name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DbSystemShape name", + SerializedName = @"dbsystemshapename", + PossibleTypes = new [] { typeof(string) })] + string Dbsystemshapename { get; set; } + /// DnsPrivateView OCID + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DnsPrivateView OCID", + SerializedName = @"dnsprivateviewocid", + PossibleTypes = new [] { typeof(string) })] + string Dnsprivateviewocid { get; set; } + /// DnsPrivateZone name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"DnsPrivateZone name", + SerializedName = @"dnsprivatezonename", + PossibleTypes = new [] { typeof(string) })] + string Dnsprivatezonename { get; set; } + /// The name of the ExadbVmCluster + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + string ExadbVMClusterName { get; set; } + /// The name of the ExascaleDbNode + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the ExascaleDbNode", + SerializedName = @"exascaleDbNodeName", + PossibleTypes = new [] { typeof(string) })] + string ExascaleDbNodeName { get; set; } + /// The name of the ExascaleDbStorageVault + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the ExascaleDbStorageVault", + SerializedName = @"exascaleDbStorageVaultName", + PossibleTypes = new [] { typeof(string) })] + string ExascaleDbStorageVaultName { get; set; } + /// The name of the FlexComponent + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the FlexComponent", + SerializedName = @"flexComponentName", + PossibleTypes = new [] { typeof(string) })] + string FlexComponentName { get; set; } + /// The name of the GiMinorVersion + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the GiMinorVersion", + SerializedName = @"giMinorVersionName", + PossibleTypes = new [] { typeof(string) })] + string GiMinorVersionName { get; set; } + /// GiVersion name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"GiVersion name", + SerializedName = @"giversionname", + PossibleTypes = new [] { typeof(string) })] + string Giversionname { get; set; } + /// Resource identity path + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource identity path", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; set; } + /// The name of the Azure region. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// The name of the resource group. The name is case insensitive. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + string ResourceGroupName { get; set; } + /// The ID of the target subscription. The value must be an UUID. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + string SubscriptionId { get; set; } + /// SystemVersion name + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SystemVersion name", + SerializedName = @"systemversionname", + PossibleTypes = new [] { typeof(string) })] + string Systemversionname { get; set; } + /// Virtual IP address hostname. + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual IP address hostname.", + SerializedName = @"virtualnetworkaddressname", + PossibleTypes = new [] { typeof(string) })] + string Virtualnetworkaddressname { get; set; } + + } + internal partial interface IOracleDatabaseResourceManagerIdentityInternal + + { + /// AutonomousDatabaseBackup id + string Adbbackupid { get; set; } + /// AutonomousDatabaseCharacterSet name + string Adbscharsetname { get; set; } + /// AutonomousDatabaseNationalCharacterSets name + string Adbsncharsetname { get; set; } + /// The database name. + string Autonomousdatabasename { get; set; } + /// AutonomousDbVersion name + string Autonomousdbversionsname { get; set; } + /// CloudExadataInfrastructure name + string Cloudexadatainfrastructurename { get; set; } + /// CloudVmCluster name + string Cloudvmclustername { get; set; } + /// DbNode OCID. + string Dbnodeocid { get; set; } + /// DbServer OCID. + string Dbserverocid { get; set; } + /// DbSystemShape name + string Dbsystemshapename { get; set; } + /// DnsPrivateView OCID + string Dnsprivateviewocid { get; set; } + /// DnsPrivateZone name + string Dnsprivatezonename { get; set; } + /// The name of the ExadbVmCluster + string ExadbVMClusterName { get; set; } + /// The name of the ExascaleDbNode + string ExascaleDbNodeName { get; set; } + /// The name of the ExascaleDbStorageVault + string ExascaleDbStorageVaultName { get; set; } + /// The name of the FlexComponent + string FlexComponentName { get; set; } + /// The name of the GiMinorVersion + string GiMinorVersionName { get; set; } + /// GiVersion name + string Giversionname { get; set; } + /// Resource identity path + string Id { get; set; } + /// The name of the Azure region. + string Location { get; set; } + /// The name of the resource group. The name is case insensitive. + string ResourceGroupName { get; set; } + /// The ID of the target subscription. The value must be an UUID. + string SubscriptionId { get; set; } + /// SystemVersion name + string Systemversionname { get; set; } + /// Virtual IP address hostname. + string Virtualnetworkaddressname { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.json.cs new file mode 100644 index 000000000000..657b8144b371 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleDatabaseResourceManagerIdentity.json.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleDatabaseResourceManagerIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleDatabaseResourceManagerIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleDatabaseResourceManagerIdentity(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} + {_autonomousdatabasename = If( json?.PropertyT("autonomousdatabasename"), out var __jsonAutonomousdatabasename) ? (string)__jsonAutonomousdatabasename : (string)Autonomousdatabasename;} + {_cloudexadatainfrastructurename = If( json?.PropertyT("cloudexadatainfrastructurename"), out var __jsonCloudexadatainfrastructurename) ? (string)__jsonCloudexadatainfrastructurename : (string)Cloudexadatainfrastructurename;} + {_cloudvmclustername = If( json?.PropertyT("cloudvmclustername"), out var __jsonCloudvmclustername) ? (string)__jsonCloudvmclustername : (string)Cloudvmclustername;} + {_exadbVMClusterName = If( json?.PropertyT("exadbVmClusterName"), out var __jsonExadbVMClusterName) ? (string)__jsonExadbVMClusterName : (string)ExadbVMClusterName;} + {_exascaleDbStorageVaultName = If( json?.PropertyT("exascaleDbStorageVaultName"), out var __jsonExascaleDbStorageVaultName) ? (string)__jsonExascaleDbStorageVaultName : (string)ExascaleDbStorageVaultName;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + {_adbscharsetname = If( json?.PropertyT("adbscharsetname"), out var __jsonAdbscharsetname) ? (string)__jsonAdbscharsetname : (string)Adbscharsetname;} + {_adbsncharsetname = If( json?.PropertyT("adbsncharsetname"), out var __jsonAdbsncharsetname) ? (string)__jsonAdbsncharsetname : (string)Adbsncharsetname;} + {_autonomousdbversionsname = If( json?.PropertyT("autonomousdbversionsname"), out var __jsonAutonomousdbversionsname) ? (string)__jsonAutonomousdbversionsname : (string)Autonomousdbversionsname;} + {_dbsystemshapename = If( json?.PropertyT("dbsystemshapename"), out var __jsonDbsystemshapename) ? (string)__jsonDbsystemshapename : (string)Dbsystemshapename;} + {_dnsprivateviewocid = If( json?.PropertyT("dnsprivateviewocid"), out var __jsonDnsprivateviewocid) ? (string)__jsonDnsprivateviewocid : (string)Dnsprivateviewocid;} + {_dnsprivatezonename = If( json?.PropertyT("dnsprivatezonename"), out var __jsonDnsprivatezonename) ? (string)__jsonDnsprivatezonename : (string)Dnsprivatezonename;} + {_flexComponentName = If( json?.PropertyT("flexComponentName"), out var __jsonFlexComponentName) ? (string)__jsonFlexComponentName : (string)FlexComponentName;} + {_giversionname = If( json?.PropertyT("giversionname"), out var __jsonGiversionname) ? (string)__jsonGiversionname : (string)Giversionname;} + {_giMinorVersionName = If( json?.PropertyT("giMinorVersionName"), out var __jsonGiMinorVersionName) ? (string)__jsonGiMinorVersionName : (string)GiMinorVersionName;} + {_systemversionname = If( json?.PropertyT("systemversionname"), out var __jsonSystemversionname) ? (string)__jsonSystemversionname : (string)Systemversionname;} + {_adbbackupid = If( json?.PropertyT("adbbackupid"), out var __jsonAdbbackupid) ? (string)__jsonAdbbackupid : (string)Adbbackupid;} + {_dbserverocid = If( json?.PropertyT("dbserverocid"), out var __jsonDbserverocid) ? (string)__jsonDbserverocid : (string)Dbserverocid;} + {_dbnodeocid = If( json?.PropertyT("dbnodeocid"), out var __jsonDbnodeocid) ? (string)__jsonDbnodeocid : (string)Dbnodeocid;} + {_virtualnetworkaddressname = If( json?.PropertyT("virtualnetworkaddressname"), out var __jsonVirtualnetworkaddressname) ? (string)__jsonVirtualnetworkaddressname : (string)Virtualnetworkaddressname;} + {_exascaleDbNodeName = If( json?.PropertyT("exascaleDbNodeName"), out var __jsonExascaleDbNodeName) ? (string)__jsonExascaleDbNodeName : (string)ExascaleDbNodeName;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,container.Add ); + AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); + AddIf( null != (((object)this._autonomousdatabasename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._autonomousdatabasename.ToString()) : null, "autonomousdatabasename" ,container.Add ); + AddIf( null != (((object)this._cloudexadatainfrastructurename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloudexadatainfrastructurename.ToString()) : null, "cloudexadatainfrastructurename" ,container.Add ); + AddIf( null != (((object)this._cloudvmclustername)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._cloudvmclustername.ToString()) : null, "cloudvmclustername" ,container.Add ); + AddIf( null != (((object)this._exadbVMClusterName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._exadbVMClusterName.ToString()) : null, "exadbVmClusterName" ,container.Add ); + AddIf( null != (((object)this._exascaleDbStorageVaultName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._exascaleDbStorageVaultName.ToString()) : null, "exascaleDbStorageVaultName" ,container.Add ); + AddIf( null != (((object)this._location)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._location.ToString()) : null, "location" ,container.Add ); + AddIf( null != (((object)this._adbscharsetname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._adbscharsetname.ToString()) : null, "adbscharsetname" ,container.Add ); + AddIf( null != (((object)this._adbsncharsetname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._adbsncharsetname.ToString()) : null, "adbsncharsetname" ,container.Add ); + AddIf( null != (((object)this._autonomousdbversionsname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._autonomousdbversionsname.ToString()) : null, "autonomousdbversionsname" ,container.Add ); + AddIf( null != (((object)this._dbsystemshapename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbsystemshapename.ToString()) : null, "dbsystemshapename" ,container.Add ); + AddIf( null != (((object)this._dnsprivateviewocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dnsprivateviewocid.ToString()) : null, "dnsprivateviewocid" ,container.Add ); + AddIf( null != (((object)this._dnsprivatezonename)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dnsprivatezonename.ToString()) : null, "dnsprivatezonename" ,container.Add ); + AddIf( null != (((object)this._flexComponentName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._flexComponentName.ToString()) : null, "flexComponentName" ,container.Add ); + AddIf( null != (((object)this._giversionname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._giversionname.ToString()) : null, "giversionname" ,container.Add ); + AddIf( null != (((object)this._giMinorVersionName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._giMinorVersionName.ToString()) : null, "giMinorVersionName" ,container.Add ); + AddIf( null != (((object)this._systemversionname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._systemversionname.ToString()) : null, "systemversionname" ,container.Add ); + AddIf( null != (((object)this._adbbackupid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._adbbackupid.ToString()) : null, "adbbackupid" ,container.Add ); + AddIf( null != (((object)this._dbserverocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbserverocid.ToString()) : null, "dbserverocid" ,container.Add ); + AddIf( null != (((object)this._dbnodeocid)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._dbnodeocid.ToString()) : null, "dbnodeocid" ,container.Add ); + AddIf( null != (((object)this._virtualnetworkaddressname)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._virtualnetworkaddressname.ToString()) : null, "virtualnetworkaddressname" ,container.Add ); + AddIf( null != (((object)this._exascaleDbNodeName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._exascaleDbNodeName.ToString()) : null, "exascaleDbNodeName" ,container.Add ); + AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..f80bc65451af --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersTypeConverter))] + public partial class OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersTypeConverter))] + public partial interface IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..13535e2b65ee --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..4c462536dab7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// + /// Creates an new instance. + /// + public OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders() + { + + } + } + public partial interface IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..505c0a0f3ce5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionsAddAzureSubscriptionsAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..be06989c392d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsDeleteAcceptedResponseHeadersTypeConverter))] + public partial class OracleSubscriptionsDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionsDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionsDeleteAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionsDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionsDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IOracleSubscriptionsDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..c5db1243677d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionsDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionsDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionsDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionsDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..edc3e88bdc16 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// + /// Creates an new instance. + /// + public OracleSubscriptionsDeleteAcceptedResponseHeaders() + { + + } + } + public partial interface IOracleSubscriptionsDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IOracleSubscriptionsDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..1ab8fc11f785 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionsDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionsDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..021137d2c33d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsListActivationLinksAcceptedResponseHeadersTypeConverter))] + public partial class OracleSubscriptionsListActivationLinksAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionsListActivationLinksAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionsListActivationLinksAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionsListActivationLinksAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionsListActivationLinksAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsListActivationLinksAcceptedResponseHeadersTypeConverter))] + public partial interface IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..672a385eebf9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionsListActivationLinksAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is + /// no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is + /// no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..04cab0a1ddb7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsListActivationLinksAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// + /// Creates an new instance. + /// + public OracleSubscriptionsListActivationLinksAcceptedResponseHeaders() + { + + } + } + public partial interface IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IOracleSubscriptionsListActivationLinksAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..0e37fe4d5f4a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListActivationLinksAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsListActivationLinksAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListActivationLinksAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionsListActivationLinksAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionsListActivationLinksAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..889616e4d0fd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersTypeConverter))] + public partial class OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersTypeConverter))] + public partial interface IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..f128f51df592 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there + /// is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..4be7d4c51e63 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// + /// Creates an new instance. + /// + public OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders() + { + + } + } + public partial interface IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..f0ce200e0f4a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionsListCloudAccountDetailsAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..6ee1e1437d69 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersTypeConverter))] + public partial class OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing + /// the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersTypeConverter))] + public partial interface IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..d663a46c173b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if + /// there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if + /// there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..7cf16cfcbf93 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// + /// Creates an new instance. + /// + public OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders() + { + + } + } + public partial interface IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..b3c52494a366 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionsListSaasSubscriptionDetailsAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into + /// a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..29992b4e513f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsUpdateAcceptedResponseHeadersTypeConverter))] + public partial class OracleSubscriptionsUpdateAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OracleSubscriptionsUpdateAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OracleSubscriptionsUpdateAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content from + /// a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal OracleSubscriptionsUpdateAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OracleSubscriptionsUpdateAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + } + [System.ComponentModel.TypeConverter(typeof(OracleSubscriptionsUpdateAcceptedResponseHeadersTypeConverter))] + public partial interface IOracleSubscriptionsUpdateAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..c9a7f06efcd5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OracleSubscriptionsUpdateAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, + /// otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OracleSubscriptionsUpdateAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OracleSubscriptionsUpdateAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OracleSubscriptionsUpdateAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..8e3756c897f9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsUpdateAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// + /// Creates an new instance. + /// + public OracleSubscriptionsUpdateAcceptedResponseHeaders() + { + + } + } + public partial interface IOracleSubscriptionsUpdateAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IOracleSubscriptionsUpdateAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..96b5cb16827c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/OracleSubscriptionsUpdateAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class OracleSubscriptionsUpdateAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleSubscriptionsUpdateAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new OracleSubscriptionsUpdateAcceptedResponseHeaders(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal OracleSubscriptionsUpdateAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.PowerShell.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..8e55ab716d83 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressesDeleteAcceptedResponseHeadersTypeConverter))] + public partial class VirtualNetworkAddressesDeleteAcceptedResponseHeaders + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new VirtualNetworkAddressesDeleteAcceptedResponseHeaders(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new VirtualNetworkAddressesDeleteAcceptedResponseHeaders(content); + } + + /// + /// Creates a new instance of , deserializing the content + /// from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// + /// an instance of the model class. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode.IncludeAll)?.ToString(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal VirtualNetworkAddressesDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal VirtualNetworkAddressesDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("RetryAfter")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).RetryAfter = (int?) content.GetValueForProperty("RetryAfter",((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).RetryAfter, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + AfterDeserializePSObject(content); + } + } + [System.ComponentModel.TypeConverter(typeof(VirtualNetworkAddressesDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IVirtualNetworkAddressesDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..bd61e754619b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class VirtualNetworkAddressesDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a + /// type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable + /// conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return VirtualNetworkAddressesDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return VirtualNetworkAddressesDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return VirtualNetworkAddressesDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..fc9ce931a677 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,77 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class VirtualNetworkAddressesDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Backing field for property. + private int? _retryAfter; + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Origin(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.PropertyOrigin.Owned)] + public int? RetryAfter { get => this._retryAfter; set => this._retryAfter = value; } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Retry-After", out var __retryAfterHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal)this).RetryAfter = System.Linq.Enumerable.FirstOrDefault(__retryAfterHeader1) is string __headerRetryAfterHeader1 ? int.TryParse( __headerRetryAfterHeader1, out int __headerRetryAfterHeader1Value ) ? __headerRetryAfterHeader1Value : default(int?) : default(int?); + } + } + + /// + /// Creates an new instance. + /// + public VirtualNetworkAddressesDeleteAcceptedResponseHeaders() + { + + } + } + public partial interface IVirtualNetworkAddressesDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Retry-After", + PossibleTypes = new [] { typeof(int) })] + int? RetryAfter { get; set; } + + } + internal partial interface IVirtualNetworkAddressesDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + int? RetryAfter { get; set; } + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.json.cs b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..0eab566aea7b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Models/VirtualNetworkAddressesDeleteAcceptedResponseHeaders.json.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public partial class VirtualNetworkAddressesDeleteAcceptedResponseHeaders + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IVirtualNetworkAddressesDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new VirtualNetworkAddressesDeleteAcceptedResponseHeaders(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject instance to deserialize from. + internal VirtualNetworkAddressesDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/OracleDatabaseResourceManager.cs b/swaggerci/oracle.DefaultTag/generated/api/OracleDatabaseResourceManager.cs new file mode 100644 index 000000000000..aa6ad97ae42c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/OracleDatabaseResourceManager.cs @@ -0,0 +1,18920 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + /// + /// Low-level API implementation for the Oracle Database Resource Manager service. + /// + public partial class OracleDatabaseResourceManager + { + + /// Create a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a AutonomousDatabaseBackup + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid),adbbackupid,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDelete(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a AutonomousDatabaseBackup + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsDelete_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid),adbbackupid,@".*"); + } + } + + /// Get a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGet(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseBackup + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsGet_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid),adbbackupid,@".*"); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByParent(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByParentViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByParent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsListByParent_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + } + } + + /// Update a AutonomousDatabaseBackup + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/autonomousDatabaseBackups/" + + global::System.Uri.EscapeDataString(adbbackupid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabaseBackup + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/autonomousDatabaseBackups/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + var adbbackupid = _match.Groups["adbbackupid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/autonomousDatabaseBackups/" + + adbbackupid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseBackupsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackup.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// AutonomousDatabaseBackup id + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseBackupsUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, string adbbackupid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(adbbackupid),adbbackupid); + await eventListener.AssertRegEx(nameof(adbbackupid),adbbackupid,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a AutonomousDatabaseCharacterSet + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGet(string subscriptionId, string location, string adbscharsetname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseCharacterSets/" + + global::System.Uri.EscapeDataString(adbscharsetname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseCharacterSet + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseCharacterSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var adbscharsetname = _match.Groups["adbscharsetname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseCharacterSets/" + + adbscharsetname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseCharacterSet name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsGet_Validate(string subscriptionId, string location, string adbscharsetname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(adbscharsetname),adbscharsetname); + await eventListener.AssertRegEx(nameof(adbscharsetname),adbscharsetname,@".*"); + } + } + + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseCharacterSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseCharacterSetsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseCharacterSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseCharacterSetsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a AutonomousDatabaseNationalCharacterSet + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGet(string subscriptionId, string location, string adbsncharsetname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseNationalCharacterSets/" + + global::System.Uri.EscapeDataString(adbsncharsetname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseNationalCharacterSets/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var adbsncharsetname = _match.Groups["adbsncharsetname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseNationalCharacterSets/" + + adbsncharsetname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSet.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDatabaseNationalCharacterSets name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsGet_Validate(string subscriptionId, string location, string adbsncharsetname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(adbsncharsetname),adbsncharsetname); + await eventListener.AssertRegEx(nameof(adbsncharsetname),adbsncharsetname,@".*"); + } + } + + /// + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDatabaseNationalCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDatabaseNationalCharacterSets$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDatabaseNationalCharacterSets" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseNationalCharacterSetsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseNationalCharacterSetListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the + /// actual call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseNationalCharacterSetsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a AutonomousDbVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDbVersion name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGet(string subscriptionId, string location, string autonomousdbversionsname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDbVersions/" + + global::System.Uri.EscapeDataString(autonomousdbversionsname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDbVersion + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDbVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var autonomousdbversionsname = _match.Groups["autonomousdbversionsname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDbVersions/" + + autonomousdbversionsname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// AutonomousDbVersion name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsGet_Validate(string subscriptionId, string location, string autonomousdbversionsname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(autonomousdbversionsname),autonomousdbversionsname); + await eventListener.AssertRegEx(nameof(autonomousdbversionsname),autonomousdbversionsname,@".*"); + } + } + + /// List AutonomousDbVersion resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/autonomousDbVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDbVersion resources by SubscriptionLocationResource + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/autonomousDbVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/autonomousDbVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabaseVersionsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDbVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabaseVersionsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesChangeDisasterRecoveryConfiguration(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/changeDisasterRecoveryConfiguration" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesChangeDisasterRecoveryConfiguration_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesChangeDisasterRecoveryConfigurationViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/changeDisasterRecoveryConfiguration$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/changeDisasterRecoveryConfiguration" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesChangeDisasterRecoveryConfiguration_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesChangeDisasterRecoveryConfiguration_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the + /// actual call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesChangeDisasterRecoveryConfiguration_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Create a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a AutonomousDatabase + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesDelete(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a AutonomousDatabase + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesDelete_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + } + } + + /// Perform failover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailover(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesFailover_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Perform failover action on Autonomous Database + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesFailoverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/failover$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/failover'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/failover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesFailover_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesFailover_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesFailover_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Generate wallet action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWallet(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGenerateWallet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Generate wallet action on Autonomous Database + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWalletViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/generateWallet$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/generateWallet" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGenerateWallet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWallet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseWalletFile.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGenerateWallet_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGet(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a AutonomousDatabase + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesGet_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + } + } + + /// List AutonomousDatabase resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabase resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List AutonomousDatabase resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List AutonomousDatabase resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/autonomousDatabases$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/autonomousDatabases" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestore(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesRestore_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesRestoreViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/restore$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/restore" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesRestore_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesRestore_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesRestore_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesShrink(string subscriptionId, string resourceGroupName, string autonomousdatabasename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/shrink" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesShrink_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesShrinkViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/shrink$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/shrink" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesShrink_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesShrink_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesShrink_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + } + } + + /// Perform switchover action on Autonomous Database + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchover(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesSwitchover_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Perform switchover action on Autonomous Database + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchoverViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)/switchover$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "/switchover" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesSwitchover_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchover_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesSwitchover_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a AutonomousDatabase + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/autonomousDatabases/" + + global::System.Uri.EscapeDataString(autonomousdatabasename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a AutonomousDatabase + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task AutonomousDatabasesUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/autonomousDatabases/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var autonomousdatabasename = _match.Groups["autonomousdatabasename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/autonomousDatabases/" + + autonomousdatabasename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.AutonomousDatabasesUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The database name. + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task AutonomousDatabasesUpdate_Validate(string subscriptionId, string resourceGroupName, string autonomousdatabasename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(autonomousdatabasename),autonomousdatabasename); + await eventListener.AssertMinimumLength(nameof(autonomousdatabasename),autonomousdatabasename,1); + await eventListener.AssertMaximumLength(nameof(autonomousdatabasename),autonomousdatabasename,30); + await eventListener.AssertRegEx(nameof(autonomousdatabasename),autonomousdatabasename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Perform add storage capacity on exadata infra + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacity(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/addStorageCapacity" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresAddStorageCapacity_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Perform add storage capacity on exadata infra + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacityViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)/addStorageCapacity$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/addStorageCapacity" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresAddStorageCapacity_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacity_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresAddStorageCapacity_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename,@".*"); + } + } + + /// Create a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a CloudExadataInfrastructure + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDelete(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a CloudExadataInfrastructure + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresDelete_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename,@".*"); + } + } + + /// Get a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGet(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a CloudExadataInfrastructure + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresGet_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename,@".*"); + } + } + + /// List CloudExadataInfrastructure resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/cloudExadataInfrastructures" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Update a CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudExadataInfrastructure + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudExadataInfrastructuresUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudExadataInfrastructuresUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Add VMs to the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVms(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersAddVms_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Add VMs to the VM Cluster + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersAddVmsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/addVms$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/addVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersAddVms_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersAddVms_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersAddVms_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Create a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a CloudVmCluster + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersDelete(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a CloudVmCluster + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersDelete_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + } + } + + /// Get a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersGet(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a CloudVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersGet_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + } + } + + /// List CloudVmCluster resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List CloudVmCluster resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List CloudVmCluster resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List CloudVmCluster resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/cloudVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/cloudVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Private IP Addresses by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddresses(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListPrivateIPAddresses_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Private IP Addresses by the provided filter + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddressesViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/listPrivateIpAddresses$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/listPrivateIpAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersListPrivateIPAddresses_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddresses_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => If( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray.Parse(body.Result) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonArray, out var __y) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__y, (__x)=>(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties) (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PrivateIPAddressProperties.FromJson(__x) )) ))() : null)); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersListPrivateIPAddresses_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Remove VMs from the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVms(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersRemoveVms_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Remove VMs from the VM Cluster + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersRemoveVmsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/removeVms$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersRemoveVms_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersRemoveVms_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersRemoveVms_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a CloudVmCluster + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task CloudVMClustersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.CloudVMClustersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task CloudVMClustersUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesAction(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesAction_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesActionViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes/(?[^/]+)/action$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var dbnodeocid = _match.Groups["dbnodeocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes/" + + dbnodeocid + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesAction_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNode.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesAction_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(dbnodeocid),dbnodeocid); + await eventListener.AssertMinimumLength(nameof(dbnodeocid),dbnodeocid,1); + await eventListener.AssertMaximumLength(nameof(dbnodeocid),dbnodeocid,255); + await eventListener.AssertRegEx(nameof(dbnodeocid),dbnodeocid,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a DbNode + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesGet(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(dbnodeocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbNode + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var dbnodeocid = _match.Groups["dbnodeocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes/" + + dbnodeocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNode.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation events + /// back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// DbNode OCID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesGet_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string dbnodeocid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(dbnodeocid),dbnodeocid); + await eventListener.AssertMinimumLength(nameof(dbnodeocid),dbnodeocid,1); + await eventListener.AssertMaximumLength(nameof(dbnodeocid),dbnodeocid,255); + await eventListener.AssertRegEx(nameof(dbnodeocid),dbnodeocid,@".*"); + } + } + + /// List DbNode resources by CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesListByParent(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List DbNode resources by CloudVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbNodesListByParentViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/dbNodes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbNodesListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesListByParent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbNodesListByParent_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + } + } + + /// Get a DbServer + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// DbServer OCID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersGet(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/dbServers/" + + global::System.Uri.EscapeDataString(dbserverocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbServer + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)/dbServers/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + var dbserverocid = _match.Groups["dbserverocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/dbServers/" + + dbserverocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServer.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// DbServer OCID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersGet_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, string dbserverocid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename,@".*"); + await eventListener.AssertNotNull(nameof(dbserverocid),dbserverocid); + await eventListener.AssertMinimumLength(nameof(dbserverocid),dbserverocid,1); + await eventListener.AssertMaximumLength(nameof(dbserverocid),dbserverocid,255); + await eventListener.AssertRegEx(nameof(dbserverocid),dbserverocid,@".*"); + } + } + + /// List DbServer resources by CloudExadataInfrastructure + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersListByParent(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + global::System.Uri.EscapeDataString(cloudexadatainfrastructurename) + + "/dbServers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List DbServer resources by CloudExadataInfrastructure + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbServersListByParentViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudExadataInfrastructures/(?[^/]+)/dbServers$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudexadatainfrastructurename = _match.Groups["cloudexadatainfrastructurename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudExadataInfrastructures/" + + cloudexadatainfrastructurename + + "/dbServers" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbServersListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersListByParent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbServerListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudExadataInfrastructure name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbServersListByParent_Validate(string subscriptionId, string resourceGroupName, string cloudexadatainfrastructurename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename); + await eventListener.AssertRegEx(nameof(cloudexadatainfrastructurename),cloudexadatainfrastructurename,@".*"); + } + } + + /// Get a DbSystemShape + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DbSystemShape name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesGet(string subscriptionId, string location, string dbsystemshapename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dbSystemShapes/" + + global::System.Uri.EscapeDataString(dbsystemshapename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a DbSystemShape + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dbSystemShapes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dbsystemshapename = _match.Groups["dbsystemshapename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dbSystemShapes/" + + dbsystemshapename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShape.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DbSystemShape name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesGet_Validate(string subscriptionId, string location, string dbsystemshapename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(dbsystemshapename),dbsystemshapename); + await eventListener.AssertRegEx(nameof(dbsystemshapename),dbsystemshapename,@".*"); + } + } + + /// List DbSystemShape resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesListByLocation(string subscriptionId, string location, string zone, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dbSystemShapes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(zone) ? global::System.String.Empty : "zone=" + global::System.Uri.EscapeDataString(zone)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List DbSystemShape resources by SubscriptionLocationResource + /// + /// Filters the result for the given Azure Availability Zone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DbSystemShapesListByLocationViaIdentity(global::System.String viaIdentity, string zone, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dbSystemShapes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dbSystemShapes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(zone) ? global::System.String.Empty : "zone=" + global::System.Uri.EscapeDataString(zone)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DbSystemShapesListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbSystemShapeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// Filters the result for the given Azure Availability Zone + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DbSystemShapesListByLocation_Validate(string subscriptionId, string location, string zone, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(zone),zone); + } + } + + /// Get a DnsPrivateView + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateView OCID + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsGet(string subscriptionId, string location, string dnsprivateviewocid, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateViews/" + + global::System.Uri.EscapeDataString(dnsprivateviewocid) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a DnsPrivateView + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateViews/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dnsprivateviewocid = _match.Groups["dnsprivateviewocid"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateViews/" + + dnsprivateviewocid + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateView.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateView OCID + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsGet_Validate(string subscriptionId, string location, string dnsprivateviewocid, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(dnsprivateviewocid),dnsprivateviewocid); + await eventListener.AssertMinimumLength(nameof(dnsprivateviewocid),dnsprivateviewocid,1); + await eventListener.AssertMaximumLength(nameof(dnsprivateviewocid),dnsprivateviewocid,255); + await eventListener.AssertRegEx(nameof(dnsprivateviewocid),dnsprivateviewocid,@".*"); + } + } + + /// List DnsPrivateView resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List DnsPrivateView resources by SubscriptionLocationResource + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateViews$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateViews" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateViewsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateViewListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateViewsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Get a DnsPrivateZone + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateZone name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesGet(string subscriptionId, string location, string dnsprivatezonename, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateZones/" + + global::System.Uri.EscapeDataString(dnsprivatezonename) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a DnsPrivateZone + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateZones/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var dnsprivatezonename = _match.Groups["dnsprivatezonename"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateZones/" + + dnsprivatezonename + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZone.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// DnsPrivateZone name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesGet_Validate(string subscriptionId, string location, string dnsprivatezonename, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(dnsprivatezonename),dnsprivatezonename); + await eventListener.AssertRegEx(nameof(dnsprivatezonename),dnsprivatezonename,@".*"); + } + } + + /// List DnsPrivateZone resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/dnsPrivateZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List DnsPrivateZone resources by SubscriptionLocationResource + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/dnsPrivateZones$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/dnsPrivateZones" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.DnsPrivateZonesListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DnsPrivateZoneListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task DnsPrivateZonesListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Create a ExadbVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a ExadbVmCluster + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a ExadbVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersDelete(string subscriptionId, string resourceGroupName, string exadbVMClusterName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a ExadbVmCluster + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersDelete_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + } + } + + /// Get a ExadbVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersGet(string subscriptionId, string resourceGroupName, string exadbVMClusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a ExadbVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersGet_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + } + } + + /// List ExadbVmCluster resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List ExadbVmCluster resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List ExadbVmCluster resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/exadbVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List ExadbVmCluster resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/exadbVmClusters$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/exadbVmClusters" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Remove VMs from the VM Cluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersRemoveVms(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersRemoveVms_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Remove VMs from the VM Cluster + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersRemoveVmsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)/removeVms$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "/removeVms" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersRemoveVms_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersRemoveVms_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersRemoveVms_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Update a ExadbVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersUpdate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a ExadbVmCluster + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExadbVMClustersUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExadbVMClustersUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExadbVMClustersUpdate_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The name of the ExascaleDbNode + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbNodesAction(string subscriptionId, string resourceGroupName, string exadbVMClusterName, string exascaleDbNodeName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(exascaleDbNodeName) + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbNodesAction_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// The content of the action request + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbNodesActionViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)/dbNodes/(?[^/]+)/action$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + var exascaleDbNodeName = _match.Groups["exascaleDbNodeName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "/dbNodes/" + + exascaleDbNodeName + + "/action" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbNodesAction_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbNodesAction_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbActionResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The name of the ExascaleDbNode + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbNodesAction_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, string exascaleDbNodeName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + await eventListener.AssertNotNull(nameof(exascaleDbNodeName),exascaleDbNodeName); + await eventListener.AssertRegEx(nameof(exascaleDbNodeName),exascaleDbNodeName,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a ExascaleDbNode + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The name of the ExascaleDbNode + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbNodesGet(string subscriptionId, string resourceGroupName, string exadbVMClusterName, string exascaleDbNodeName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "/dbNodes/" + + global::System.Uri.EscapeDataString(exascaleDbNodeName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbNodesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a ExascaleDbNode + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbNodesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)/dbNodes/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + var exascaleDbNodeName = _match.Groups["exascaleDbNodeName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "/dbNodes/" + + exascaleDbNodeName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbNodesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbNodesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNode.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// The name of the ExascaleDbNode + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbNodesGet_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, string exascaleDbNodeName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + await eventListener.AssertNotNull(nameof(exascaleDbNodeName),exascaleDbNodeName); + await eventListener.AssertRegEx(nameof(exascaleDbNodeName),exascaleDbNodeName,@".*"); + } + } + + /// List ExascaleDbNode resources by ExadbVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbNodesListByParent(string subscriptionId, string resourceGroupName, string exadbVMClusterName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exadbVmClusters/" + + global::System.Uri.EscapeDataString(exadbVMClusterName) + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbNodesListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List ExascaleDbNode resources by ExadbVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbNodesListByParentViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exadbVmClusters/(?[^/]+)/dbNodes$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exadbVMClusterName = _match.Groups["exadbVmClusterName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exadbVmClusters/" + + exadbVMClusterName + + "/dbNodes" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbNodesListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbNodesListByParent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbNodeListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExadbVmCluster + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbNodesListByParent_Validate(string subscriptionId, string resourceGroupName, string exadbVMClusterName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exadbVMClusterName),exadbVMClusterName); + await eventListener.AssertRegEx(nameof(exadbVMClusterName),exadbVMClusterName,@".*"); + } + } + + /// Create a ExascaleDbStorageVault + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsCreate(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + global::System.Uri.EscapeDataString(exascaleDbStorageVaultName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a ExascaleDbStorageVault + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsCreateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exascaleDbStorageVaults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exascaleDbStorageVaultName = _match.Groups["exascaleDbStorageVaultName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + exascaleDbStorageVaultName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsCreate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsCreate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVault.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsCreate_Validate(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName); + await eventListener.AssertRegEx(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a ExascaleDbStorageVault + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsDelete(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + global::System.Uri.EscapeDataString(exascaleDbStorageVaultName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a ExascaleDbStorageVault + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exascaleDbStorageVaults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exascaleDbStorageVaultName = _match.Groups["exascaleDbStorageVaultName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + exascaleDbStorageVaultName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsDelete_Validate(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName); + await eventListener.AssertRegEx(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName,@".*"); + } + } + + /// Get a ExascaleDbStorageVault + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsGet(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + global::System.Uri.EscapeDataString(exascaleDbStorageVaultName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a ExascaleDbStorageVault + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exascaleDbStorageVaults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exascaleDbStorageVaultName = _match.Groups["exascaleDbStorageVaultName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + exascaleDbStorageVaultName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVault.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsGet_Validate(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName); + await eventListener.AssertRegEx(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName,@".*"); + } + } + + /// List ExascaleDbStorageVault resources by resource group + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListByResourceGroup(string subscriptionId, string resourceGroupName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exascaleDbStorageVaults" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List ExascaleDbStorageVault resources by resource group + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListByResourceGroupViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exascaleDbStorageVaults$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exascaleDbStorageVaults" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsListByResourceGroup_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListByResourceGroup_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + } + } + + /// List ExascaleDbStorageVault resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/exascaleDbStorageVaults" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/exascaleDbStorageVaults$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/exascaleDbStorageVaults" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Update a ExascaleDbStorageVault + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsUpdate(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + global::System.Uri.EscapeDataString(exascaleDbStorageVaultName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a ExascaleDbStorageVault + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/exascaleDbStorageVaults/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var exascaleDbStorageVaultName = _match.Groups["exascaleDbStorageVaultName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/exascaleDbStorageVaults/" + + exascaleDbStorageVaultName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.ExascaleDbStorageVaultsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVault.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// The name of the ExascaleDbStorageVault + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task ExascaleDbStorageVaultsUpdate_Validate(string subscriptionId, string resourceGroupName, string exascaleDbStorageVaultName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName); + await eventListener.AssertRegEx(nameof(exascaleDbStorageVaultName),exascaleDbStorageVaultName,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a FlexComponent + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name of the FlexComponent + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FlexComponentsGet(string subscriptionId, string location, string flexComponentName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/flexComponents/" + + global::System.Uri.EscapeDataString(flexComponentName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FlexComponentsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a FlexComponent + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FlexComponentsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/flexComponents/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var flexComponentName = _match.Groups["flexComponentName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/flexComponents/" + + flexComponentName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FlexComponentsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FlexComponentsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponent.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// The name of the FlexComponent + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FlexComponentsGet_Validate(string subscriptionId, string location, string flexComponentName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(flexComponentName),flexComponentName); + await eventListener.AssertRegEx(nameof(flexComponentName),flexComponentName,@"^[a-zA-Z0-9-]{3,24}$"); + } + } + + /// List FlexComponent resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FlexComponentsListByParent(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes? shape, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/flexComponents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(shape) ? global::System.String.Empty : "shape=" + global::System.Uri.EscapeDataString(shape)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FlexComponentsListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List FlexComponent resources by SubscriptionLocationResource + /// + /// If provided, filters the results for the given shape + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task FlexComponentsListByParentViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes? shape, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/flexComponents$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/flexComponents" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(shape) ? global::System.String.Empty : "shape=" + global::System.Uri.EscapeDataString(shape)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.FlexComponentsListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FlexComponentsListByParent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.FlexComponentListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task FlexComponentsListByParent_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes? shape, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(shape),shape); + await eventListener.AssertEnum(nameof(shape),shape,@"Exadata.X9M", @"Exadata.X11M", @"ExaDbXS"); + } + } + + /// Get a GiMinorVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// The name of the GiMinorVersion + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiMinorVersionsGet(string subscriptionId, string location, string giversionname, string giMinorVersionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions/" + + global::System.Uri.EscapeDataString(giversionname) + + "/giMinorVersions/" + + global::System.Uri.EscapeDataString(giMinorVersionName) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiMinorVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a GiMinorVersion + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiMinorVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions/(?[^/]+)/giMinorVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var giversionname = _match.Groups["giversionname"].Value; + var giMinorVersionName = _match.Groups["giMinorVersionName"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions/" + + giversionname + + "/giMinorVersions/" + + giMinorVersionName + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiMinorVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiMinorVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// The name of the GiMinorVersion + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiMinorVersionsGet_Validate(string subscriptionId, string location, string giversionname, string giMinorVersionName, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(giversionname),giversionname); + await eventListener.AssertRegEx(nameof(giversionname),giversionname,@".*"); + await eventListener.AssertNotNull(nameof(giMinorVersionName),giMinorVersionName); + await eventListener.AssertRegEx(nameof(giMinorVersionName),giMinorVersionName,@"^[a-zA-Z0-9-]{3,24}$"); + } + } + + /// List GiMinorVersion resources by GiVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// If provided, filters the results to the set of database versions which are supported for the + /// given shape family. + /// Filters the result for the given Azure Availability Zone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiMinorVersionsListByParent(string subscriptionId, string location, string giversionname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily? shapeFamily, string zone, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions/" + + global::System.Uri.EscapeDataString(giversionname) + + "/giMinorVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(shapeFamily) ? global::System.String.Empty : "shapeFamily=" + global::System.Uri.EscapeDataString(shapeFamily)) + + "&" + + (string.IsNullOrEmpty(zone) ? global::System.String.Empty : "zone=" + global::System.Uri.EscapeDataString(zone)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiMinorVersionsListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List GiMinorVersion resources by GiVersion + /// + /// If provided, filters the results to the set of database versions which are supported for the + /// given shape family. + /// Filters the result for the given Azure Availability Zone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiMinorVersionsListByParentViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily? shapeFamily, string zone, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions/(?[^/]+)/giMinorVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var giversionname = _match.Groups["giversionname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions/" + + giversionname + + "/giMinorVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(shapeFamily) ? global::System.String.Empty : "shapeFamily=" + global::System.Uri.EscapeDataString(shapeFamily)) + + "&" + + (string.IsNullOrEmpty(zone) ? global::System.String.Empty : "zone=" + global::System.Uri.EscapeDataString(zone)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiMinorVersionsListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiMinorVersionsListByParent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiMinorVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// If provided, filters the results to the set of database versions which are supported for the + /// given shape family. + /// Filters the result for the given Azure Availability Zone + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiMinorVersionsListByParent_Validate(string subscriptionId, string location, string giversionname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily? shapeFamily, string zone, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(giversionname),giversionname); + await eventListener.AssertRegEx(nameof(giversionname),giversionname,@".*"); + await eventListener.AssertNotNull(nameof(shapeFamily),shapeFamily); + await eventListener.AssertEnum(nameof(shapeFamily),shapeFamily,@"EXADATA", @"EXADB_XS"); + await eventListener.AssertNotNull(nameof(zone),zone); + } + } + + /// Get a GiVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsGet(string subscriptionId, string location, string giversionname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions/" + + global::System.Uri.EscapeDataString(giversionname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a GiVersion + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var giversionname = _match.Groups["giversionname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions/" + + giversionname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// GiVersion name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsGet_Validate(string subscriptionId, string location, string giversionname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(giversionname),giversionname); + await eventListener.AssertRegEx(nameof(giversionname),giversionname,@".*"); + } + } + + /// List GiVersion resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape + /// Filters the result for the given Azure Availability Zone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsListByLocation(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes? shape, string zone, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/giVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(shape) ? global::System.String.Empty : "shape=" + global::System.Uri.EscapeDataString(shape)) + + "&" + + (string.IsNullOrEmpty(zone) ? global::System.String.Empty : "zone=" + global::System.Uri.EscapeDataString(zone)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List GiVersion resources by SubscriptionLocationResource + /// + /// If provided, filters the results for the given shape + /// Filters the result for the given Azure Availability Zone + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task GiVersionsListByLocationViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes? shape, string zone, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/giVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/giVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + + "&" + + (string.IsNullOrEmpty(shape) ? global::System.String.Empty : "shape=" + global::System.Uri.EscapeDataString(shape)) + + "&" + + (string.IsNullOrEmpty(zone) ? global::System.String.Empty : "zone=" + global::System.Uri.EscapeDataString(zone)) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.GiVersionsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GiVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// If provided, filters the results for the given shape + /// Filters the result for the given Azure Availability Zone + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task GiVersionsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes? shape, string zone, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(shape),shape); + await eventListener.AssertEnum(nameof(shape),shape,@"Exadata.X9M", @"Exadata.X11M", @"ExaDbXS"); + await eventListener.AssertNotNull(nameof(zone),zone); + } + } + + /// List the operations for the provider + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsList(global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Oracle.Database/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List the operations for the provider + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OperationsListViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/providers/Oracle.Database/operations$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/providers/Oracle.Database/operations'"); + } + + // replace URI parameters with values from identity + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/providers/Oracle.Database/operations" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OperationsList_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.OperationListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OperationsList_Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + + } + } + + /// Add Azure Subscriptions + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsAddAzureSubscriptions(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsAddAzureSubscriptions_Call(request,onDefault,eventListener,sender); + } + } + + /// Add Azure Subscriptions + /// + /// The content of the action request + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsAddAzureSubscriptionsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions body, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsAddAzureSubscriptions_Call(request,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsAddAzureSubscriptions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The content of the action request + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsAddAzureSubscriptions_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Create a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a OracleSubscription + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsCreateOrUpdate_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsDelete(string subscriptionId, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a OracleSubscription + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsDelete_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Get a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsGet(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a OracleSubscription + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsGet_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Activation Links + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinks(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListActivationLinks_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Activation Links + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinksViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListActivationLinks_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinks_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ActivationLinks.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListActivationLinks_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List OracleSubscription resources by subscription ID + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscription(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List OracleSubscription resources by subscription ID + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscriptionViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListBySubscription_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscription_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListBySubscription_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Cloud Account Details + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetails(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListCloudAccountDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Cloud Account Details + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListCloudAccountDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetails_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudAccountDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, + /// but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListCloudAccountDetails_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// List Saas Subscription Details + /// The ID of the target subscription. The value must be an UUID. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetails(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListSaasSubscriptionDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List Saas Subscription Details + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetailsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Post, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsListSaasSubscriptionDetails_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetails_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SaasSubscriptionDetails.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual + /// call, but you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsListSaasSubscriptionDetails_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + } + } + + /// Update a OracleSubscription + /// The ID of the target subscription. The value must be an UUID. + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Update a OracleSubscription + /// + /// The resource properties to be updated. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task OracleSubscriptionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/oracleSubscriptions/default$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/oracleSubscriptions/default" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Patch, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.OracleSubscriptionsUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscription.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The resource properties to be updated. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task OracleSubscriptionsUpdate_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Get a SystemVersion + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// SystemVersion name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsGet(string subscriptionId, string location, string systemversionname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/systemVersions/" + + global::System.Uri.EscapeDataString(systemversionname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a SystemVersion + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/systemVersions/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + var systemversionname = _match.Groups["systemversionname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/systemVersions/" + + systemversionname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersion.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get validation + /// events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// SystemVersion name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsGet_Validate(string subscriptionId, string location, string systemversionname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + await eventListener.AssertNotNull(nameof(systemversionname),systemversionname); + await eventListener.AssertRegEx(nameof(systemversionname),systemversionname,@".*"); + } + } + + /// List SystemVersion resources by SubscriptionLocationResource + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsListByLocation(string subscriptionId, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/providers/Oracle.Database/locations/" + + global::System.Uri.EscapeDataString(location) + + "/systemVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List SystemVersion resources by SubscriptionLocationResource + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task SystemVersionsListByLocationViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/providers/Oracle.Database/locations/(?[^/]+)/systemVersions$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var location = _match.Groups["location"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/providers/Oracle.Database/locations/" + + location + + "/systemVersions" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.SystemVersionsListByLocation_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsListByLocation_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.SystemVersionListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the Azure region. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task SystemVersionsListByLocation_Validate(string subscriptionId, string location, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(location),location); + await eventListener.AssertMinimumLength(nameof(location),location,1); + } + } + + /// Create a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Create a VirtualNetworkAddress + /// + /// Resource create parameters. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Put, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).ToString() : @"{}", global::System.Text.Encoding.UTF8); + request.Content.Headers.ContentType = global::System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BodyContentSet); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// + /// Actual wire call for method. + /// + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdate_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: azure-async-operation + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddress.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but + /// you will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// Resource create parameters. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress body, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(virtualnetworkaddressname),virtualnetworkaddressname); + await eventListener.AssertMinimumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,1); + await eventListener.AssertMaximumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,63); + await eventListener.AssertRegEx(nameof(virtualnetworkaddressname),virtualnetworkaddressname,@".*"); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); + } + } + + /// Delete a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesDelete(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Delete a VirtualNetworkAddress + /// + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Delete, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 204 (NoContent). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesDelete_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"Location"); + while (request.Method == System.Net.Http.HttpMethod.Put && _response.StatusCode == global::System.Net.HttpStatusCode.OK || _response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // while we wait, let's grab the headers and get ready to poll. + if (!System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Azure-AsyncOperation"))) { + asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + } + if (!global::System.String.IsNullOrEmpty(_response.GetFirstHeader(@"Location"))) { + location = _response.GetFirstHeader(@"Location"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // and let's look at the current response body and see if we have some information we can give back to the listener + var content = await _response.Content.ReadAsStringAsync(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // drop the old response + _response?.Dispose(); + + // make the polling call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // if we got back an OK, take a peek inside and see if it's done + if( _response.StatusCode == global::System.Net.HttpStatusCode.OK) + { + var error = false; + try { + if( Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(await _response.Content.ReadAsStringAsync()) is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + var state = json.Property("properties")?.PropertyT("provisioningState") ?? json.PropertyT("status"); + if( state is null ) + { + // the body doesn't contain any information that has the state of the LRO + // we're going to just get out, and let the consumer have the result + break; + } + + switch( state?.ToString()?.ToLower() ) + { + case "failed": + error = true; + break; + case "succeeded": + case "canceled": + // we're done polling. + break; + + default: + // need to keep polling! + _response.StatusCode = global::System.Net.HttpStatusCode.Created; + continue; + } + } + } catch { + // if we run into a problem peeking into the result, + // we really don't want to do anything special. + } + if (error) { + throw new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException(_response); + } + } + + // check for terminal status code + if (_response.StatusCode == global::System.Net.HttpStatusCode.Created || _response.StatusCode == global::System.Net.HttpStatusCode.Accepted ) + { + continue; + } + // we are done polling, do a request on final target? + // create a new request with the final uri + request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get); + + // drop the old response + _response?.Dispose(); + + // make the final call + _response = await sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Polling, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + break; + } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.NoContent: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onNoContent(_response); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will + /// get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesDelete_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(virtualnetworkaddressname),virtualnetworkaddressname); + await eventListener.AssertMinimumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,1); + await eventListener.AssertMaximumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,63); + await eventListener.AssertRegEx(nameof(virtualnetworkaddressname),virtualnetworkaddressname,@".*"); + } + } + + /// Get a VirtualNetworkAddress + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesGet(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses/" + + global::System.Uri.EscapeDataString(virtualnetworkaddressname) + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Get a VirtualNetworkAddress + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses/(?[^/]+)$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + var virtualnetworkaddressname = _match.Groups["virtualnetworkaddressname"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses/" + + virtualnetworkaddressname + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesGet_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesGet_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddress.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you will get + /// validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// Virtual IP address hostname. + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesGet_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, string virtualnetworkaddressname, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + await eventListener.AssertNotNull(nameof(virtualnetworkaddressname),virtualnetworkaddressname); + await eventListener.AssertMinimumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,1); + await eventListener.AssertMaximumLength(nameof(virtualnetworkaddressname),virtualnetworkaddressname,63); + await eventListener.AssertRegEx(nameof(virtualnetworkaddressname),virtualnetworkaddressname,@".*"); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByParent(string subscriptionId, string resourceGroupName, string cloudvmclustername, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + global::System.Uri.EscapeDataString(subscriptionId) + + "/resourceGroups/" + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Oracle.Database/cloudVmClusters/" + + global::System.Uri.EscapeDataString(cloudvmclustername) + + "/virtualNetworkAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// List VirtualNetworkAddress resources by CloudVmCluster + /// + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + public async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByParentViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + var apiVersion = @"2025-03-01"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri + + var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?[^/]+)/resourceGroups/(?[^/]+)/providers/Oracle.Database/cloudVmClusters/(?[^/]+)/virtualNetworkAddresses$", global::System.Text.RegularExpressions.RegexOptions.IgnoreCase).Match(viaIdentity); + if (!_match.Success) + { + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses'"); + } + + // replace URI parameters with values from identity + var subscriptionId = _match.Groups["subscriptionId"].Value; + var resourceGroupName = _match.Groups["resourceGroupName"].Value; + var cloudvmclustername = _match.Groups["cloudvmclustername"].Value; + // construct URL + var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( + "/subscriptions/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Oracle.Database/cloudVmClusters/" + + cloudvmclustername + + "/virtualNetworkAddresses" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + // generate request object + var _url = new global::System.Uri($"https://management.azure.com{pathAndQuery}"); + var request = new global::System.Net.Http.HttpRequestMessage(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get, _url); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.RequestCreated, request.RequestUri.PathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } + + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.VirtualNetworkAddressesListByParent_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Actual wire call for method. + /// the prepared HttpRequestMessage to send. + /// a delegate that is called when the remote service returns 200 (OK). + /// a delegate that is called when the remote service returns default (any response code not handled + /// elsewhere). + /// an instance that will receive events. + /// an instance of an Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync pipeline to use to make the request. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByParent_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.ISendAsync sender) + { + using( NoSynchronizationContext ) + { + global::System.Net.Http.HttpResponseMessage _response = null; + try + { + var sendTask = sender.SendAsync(request, eventListener); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeCall, request); if( eventListener.Token.IsCancellationRequested ) { return; } + _response = await sendTask; + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + var _contentType = _response.Content.Headers.ContentType?.MediaType; + + switch ( _response.StatusCode ) + { + case global::System.Net.HttpStatusCode.OK: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddressListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + default: + { + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } + await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ErrorResponse.FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; + } + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } + + /// + /// Validation method for method. Call this like the actual call, but you + /// will get validation events back. + /// + /// The ID of the target subscription. The value must be an UUID. + /// The name of the resource group. The name is case insensitive. + /// CloudVmCluster name + /// an instance that will receive events. + /// + /// A that will be complete when handling of the response is completed. + /// + internal async global::System.Threading.Tasks.Task VirtualNetworkAddressesListByParent_Validate(string subscriptionId, string resourceGroupName, string cloudvmclustername, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener eventListener) + { + using( NoSynchronizationContext ) + { + await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertRegEx(nameof(subscriptionId),subscriptionId,@"^[0-9a-fA-F]{8}(-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}$"); + await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); + await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); + await eventListener.AssertNotNull(nameof(cloudvmclustername),cloudvmclustername); + await eventListener.AssertRegEx(nameof(cloudvmclustername),cloudvmclustername,@".*"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.Completer.cs new file mode 100644 index 000000000000..bfecb5a40e7a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.Completer.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionTypeTypeConverter))] + public partial struct ActionType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Internal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Internal'", "Internal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Internal"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.TypeConverter.cs new file mode 100644 index 000000000000..2d53fd39a95e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + public partial class ActionTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ActionType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.cs new file mode 100644 index 000000000000..61693a77a76f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ActionType.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// + /// Enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. + /// + public partial struct ActionType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType Internal = @"Internal"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ActionType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ActionType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ActionType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ActionType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ActionType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ActionType && Equals((ActionType)obj); + } + + /// Returns hashCode for enum ActionType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ActionType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ActionType + /// the value to convert to an instance of . + + public static implicit operator ActionType(string value) + { + return new ActionType(value); + } + + /// Implicit operator to convert ActionType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType e) + { + return e._value; + } + + /// Overriding != operator for enum ActionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ActionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ActionType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.Completer.cs new file mode 100644 index 000000000000..88146eac576e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Add Subscription Operation state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationStateTypeConverter))] + public partial struct AddSubscriptionOperationState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.TypeConverter.cs new file mode 100644 index 000000000000..b2988c131e0d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Add Subscription Operation state enum + public partial class AddSubscriptionOperationStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AddSubscriptionOperationState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.cs new file mode 100644 index 000000000000..c736aa9ac4ac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AddSubscriptionOperationState.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Add Subscription Operation state enum + public partial struct AddSubscriptionOperationState : + System.IEquatable + { + /// Failed - State when Add Subscription operation failed + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState Failed = @"Failed"; + + /// Succeeded - State when Add Subscription operation succeeded + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState Succeeded = @"Succeeded"; + + /// Updating - State when Add Subscription operation is being Updated + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AddSubscriptionOperationState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AddSubscriptionOperationState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AddSubscriptionOperationState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AddSubscriptionOperationState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AddSubscriptionOperationState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AddSubscriptionOperationState && Equals((AddSubscriptionOperationState)obj); + } + + /// Returns hashCode for enum AddSubscriptionOperationState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AddSubscriptionOperationState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AddSubscriptionOperationState + /// the value to convert to an instance of . + + public static implicit operator AddSubscriptionOperationState(string value) + { + return new AddSubscriptionOperationState(value); + } + + /// Implicit operator to convert AddSubscriptionOperationState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState e) + { + return e._value; + } + + /// Overriding != operator for enum AddSubscriptionOperationState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AddSubscriptionOperationState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AddSubscriptionOperationState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.Completer.cs new file mode 100644 index 000000000000..52073d7bb777 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database backup lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleStateTypeConverter))] + public partial struct AutonomousDatabaseBackupLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..76ea54863ab7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database backup lifecycle state enum + public partial class AutonomousDatabaseBackupLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AutonomousDatabaseBackupLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.cs new file mode 100644 index 000000000000..61ddc25207d3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupLifecycleState.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database backup lifecycle state enum + public partial struct AutonomousDatabaseBackupLifecycleState : + System.IEquatable + { + /// AutonomousDatabase backup is active + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState Active = @"Active"; + + /// AutonomousDatabase backup is creating + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState Creating = @"Creating"; + + /// AutonomousDatabase backup is deleting + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState Deleting = @"Deleting"; + + /// AutonomousDatabase backup is failed + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState Failed = @"Failed"; + + /// AutonomousDatabase backup is updating + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AutonomousDatabaseBackupLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutonomousDatabaseBackupLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutonomousDatabaseBackupLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutonomousDatabaseBackupLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AutonomousDatabaseBackupLifecycleState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutonomousDatabaseBackupLifecycleState && Equals((AutonomousDatabaseBackupLifecycleState)obj); + } + + /// Returns hashCode for enum AutonomousDatabaseBackupLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutonomousDatabaseBackupLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutonomousDatabaseBackupLifecycleState + /// the value to convert to an instance of . + + public static implicit operator AutonomousDatabaseBackupLifecycleState(string value) + { + return new AutonomousDatabaseBackupLifecycleState(value); + } + + /// Implicit operator to convert AutonomousDatabaseBackupLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum AutonomousDatabaseBackupLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutonomousDatabaseBackupLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.Completer.cs new file mode 100644 index 000000000000..b3da6e930e92 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database backup type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupTypeTypeConverter))] + public partial struct AutonomousDatabaseBackupType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Incremental".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Incremental'", "Incremental", global::System.Management.Automation.CompletionResultType.ParameterValue, "Incremental"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Full".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Full'", "Full", global::System.Management.Automation.CompletionResultType.ParameterValue, "Full"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LongTerm".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LongTerm'", "LongTerm", global::System.Management.Automation.CompletionResultType.ParameterValue, "LongTerm"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.TypeConverter.cs new file mode 100644 index 000000000000..3a62a434c033 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database backup type enum + public partial class AutonomousDatabaseBackupTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AutonomousDatabaseBackupType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.cs new file mode 100644 index 000000000000..b066eaa939e6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseBackupType.cs @@ -0,0 +1,107 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database backup type enum + public partial struct AutonomousDatabaseBackupType : + System.IEquatable + { + /// Full backup + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType Full = @"Full"; + + /// Incremental backup + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType Incremental = @"Incremental"; + + /// LongTerm backup + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType LongTerm = @"LongTerm"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AutonomousDatabaseBackupType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutonomousDatabaseBackupType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutonomousDatabaseBackupType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutonomousDatabaseBackupType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type AutonomousDatabaseBackupType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutonomousDatabaseBackupType && Equals((AutonomousDatabaseBackupType)obj); + } + + /// Returns hashCode for enum AutonomousDatabaseBackupType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutonomousDatabaseBackupType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutonomousDatabaseBackupType + /// the value to convert to an instance of . + + public static implicit operator AutonomousDatabaseBackupType(string value) + { + return new AutonomousDatabaseBackupType(value); + } + + /// Implicit operator to convert AutonomousDatabaseBackupType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType e) + { + return e._value; + } + + /// Overriding != operator for enum AutonomousDatabaseBackupType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutonomousDatabaseBackupType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseBackupType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.Completer.cs new file mode 100644 index 000000000000..8de4bcddf021 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.Completer.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleStateTypeConverter))] + public partial struct AutonomousDatabaseLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopping".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stopping'", "Stopping", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopping"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopped".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stopped'", "Stopped", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopped"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Starting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Starting'", "Starting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Starting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminating'", "Terminating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminated'", "Terminated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminated"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unavailable".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Unavailable'", "Unavailable", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unavailable"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RestoreInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RestoreInProgress'", "RestoreInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "RestoreInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RestoreFailed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RestoreFailed'", "RestoreFailed", global::System.Management.Automation.CompletionResultType.ParameterValue, "RestoreFailed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BackupInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BackupInProgress'", "BackupInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "BackupInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ScaleInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ScaleInProgress'", "ScaleInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "ScaleInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AvailableNeedsAttention".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AvailableNeedsAttention'", "AvailableNeedsAttention", global::System.Management.Automation.CompletionResultType.ParameterValue, "AvailableNeedsAttention"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MaintenanceInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MaintenanceInProgress'", "MaintenanceInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "MaintenanceInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Restarting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Restarting'", "Restarting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Restarting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Recreating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Recreating'", "Recreating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Recreating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RoleChangeInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RoleChangeInProgress'", "RoleChangeInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "RoleChangeInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Upgrading".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Upgrading'", "Upgrading", global::System.Management.Automation.CompletionResultType.ParameterValue, "Upgrading"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Inaccessible".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Inaccessible'", "Inaccessible", global::System.Management.Automation.CompletionResultType.ParameterValue, "Inaccessible"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standby".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standby'", "Standby", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standby"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..db4d4c297eaa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database lifecycle state enum + public partial class AutonomousDatabaseLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AutonomousDatabaseLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.cs new file mode 100644 index 000000000000..e6fcfae3fb0a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousDatabaseLifecycleState.cs @@ -0,0 +1,163 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database lifecycle state enum + public partial struct AutonomousDatabaseLifecycleState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Available = @"Available"; + + /// Indicates that resource is available but needs attention + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState AvailableNeedsAttention = @"AvailableNeedsAttention"; + + /// Indicates that resource in BackupInProgress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState BackupInProgress = @"BackupInProgress"; + + /// IIndicates that resource in Inaccessible state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Inaccessible = @"Inaccessible"; + + /// Indicates that resource maintenance in progress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState MaintenanceInProgress = @"MaintenanceInProgress"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Provisioning = @"Provisioning"; + + /// Indicates that resource in Recreating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Recreating = @"Recreating"; + + /// Indicates that resource in Restarting state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Restarting = @"Restarting"; + + /// Indicates that resource in RestoreFailed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState RestoreFailed = @"RestoreFailed"; + + /// Indicates that resource in RestoreInProgress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState RestoreInProgress = @"RestoreInProgress"; + + /// Indicates that resource role change in progress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState RoleChangeInProgress = @"RoleChangeInProgress"; + + /// Indicates that resource in ScaleInProgress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState ScaleInProgress = @"ScaleInProgress"; + + /// Indicates that resource in Standby state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Standby = @"Standby"; + + /// Indicates that resource in Starting state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Starting = @"Starting"; + + /// Indicates that resource in Stopped state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Stopped = @"Stopped"; + + /// Indicates that resource in Stopping state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Stopping = @"Stopping"; + + /// Indicates that resource in Terminated state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Terminated = @"Terminated"; + + /// Indicates that resource in Terminating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Terminating = @"Terminating"; + + /// Indicates that resource in Unavailable state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Unavailable = @"Unavailable"; + + /// Indicates that resource in Updating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Updating = @"Updating"; + + /// Indicates that resource in Upgrading state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState Upgrading = @"Upgrading"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AutonomousDatabaseLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutonomousDatabaseLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutonomousDatabaseLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutonomousDatabaseLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AutonomousDatabaseLifecycleState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutonomousDatabaseLifecycleState && Equals((AutonomousDatabaseLifecycleState)obj); + } + + /// Returns hashCode for enum AutonomousDatabaseLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutonomousDatabaseLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutonomousDatabaseLifecycleState + /// the value to convert to an instance of . + + public static implicit operator AutonomousDatabaseLifecycleState(string value) + { + return new AutonomousDatabaseLifecycleState(value); + } + + /// Implicit operator to convert AutonomousDatabaseLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum AutonomousDatabaseLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutonomousDatabaseLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousDatabaseLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.Completer.cs new file mode 100644 index 000000000000..593651e32f93 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database maintenance schedule type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleTypeTypeConverter))] + public partial struct AutonomousMaintenanceScheduleType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Early".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Early'", "Early", global::System.Management.Automation.CompletionResultType.ParameterValue, "Early"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Regular".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Regular'", "Regular", global::System.Management.Automation.CompletionResultType.ParameterValue, "Regular"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.TypeConverter.cs new file mode 100644 index 000000000000..7c1b2234a68a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database maintenance schedule type enum. + public partial class AutonomousMaintenanceScheduleTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AutonomousMaintenanceScheduleType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.cs new file mode 100644 index 000000000000..9dc1f40ad399 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AutonomousMaintenanceScheduleType.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Autonomous database maintenance schedule type enum. + public partial struct AutonomousMaintenanceScheduleType : + System.IEquatable + { + /// Early maintenance schedule + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType Early = @"Early"; + + /// Regular maintenance schedule + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType Regular = @"Regular"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AutonomousMaintenanceScheduleType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AutonomousMaintenanceScheduleType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AutonomousMaintenanceScheduleType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AutonomousMaintenanceScheduleType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AutonomousMaintenanceScheduleType (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AutonomousMaintenanceScheduleType && Equals((AutonomousMaintenanceScheduleType)obj); + } + + /// Returns hashCode for enum AutonomousMaintenanceScheduleType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AutonomousMaintenanceScheduleType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AutonomousMaintenanceScheduleType + /// the value to convert to an instance of . + + public static implicit operator AutonomousMaintenanceScheduleType(string value) + { + return new AutonomousMaintenanceScheduleType(value); + } + + /// Implicit operator to convert AutonomousMaintenanceScheduleType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType e) + { + return e._value; + } + + /// Overriding != operator for enum AutonomousMaintenanceScheduleType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AutonomousMaintenanceScheduleType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.Completer.cs new file mode 100644 index 000000000000..e28428ff60bf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Azure Resource Provisioning State enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningStateTypeConverter))] + public partial struct AzureResourceProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..d57550f8f1d4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Azure Resource Provisioning State enum + public partial class AzureResourceProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => AzureResourceProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.cs new file mode 100644 index 000000000000..949c071cbc6f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/AzureResourceProvisioningState.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Azure Resource Provisioning State enum + public partial struct AzureResourceProvisioningState : + System.IEquatable + { + /// Resource creation was canceled. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState Canceled = @"Canceled"; + + /// Resource creation failed. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState Failed = @"Failed"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState Provisioning = @"Provisioning"; + + /// Resource has been created. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState Succeeded = @"Succeeded"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private AzureResourceProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to AzureResourceProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new AzureResourceProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type AzureResourceProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type AzureResourceProvisioningState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is AzureResourceProvisioningState && Equals((AzureResourceProvisioningState)obj); + } + + /// Returns hashCode for enum AzureResourceProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for AzureResourceProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to AzureResourceProvisioningState + /// the value to convert to an instance of . + + public static implicit operator AzureResourceProvisioningState(string value) + { + return new AzureResourceProvisioningState(value); + } + + /// Implicit operator to convert AzureResourceProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum AzureResourceProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum AzureResourceProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.Completer.cs new file mode 100644 index 000000000000..ed770945f71e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Clone type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneTypeTypeConverter))] + public partial struct CloneType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Full".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Full'", "Full", global::System.Management.Automation.CompletionResultType.ParameterValue, "Full"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Metadata".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Metadata'", "Metadata", global::System.Management.Automation.CompletionResultType.ParameterValue, "Metadata"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.TypeConverter.cs new file mode 100644 index 000000000000..b6cb738ba9f2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Clone type enum + public partial class CloneTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CloneType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.cs new file mode 100644 index 000000000000..e7391e75bcac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloneType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Clone type enum + public partial struct CloneType : + System.IEquatable + { + /// Full clone + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType Full = @"Full"; + + /// Metadata only + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType Metadata = @"Metadata"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CloneType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CloneType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CloneType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CloneType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CloneType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CloneType && Equals((CloneType)obj); + } + + /// Returns hashCode for enum CloneType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CloneType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CloneType + /// the value to convert to an instance of . + + public static implicit operator CloneType(string value) + { + return new CloneType(value); + } + + /// Implicit operator to convert CloneType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType e) + { + return e._value; + } + + /// Overriding != operator for enum CloneType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CloneType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloneType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.Completer.cs new file mode 100644 index 000000000000..39a7e498a298 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// CloudAccountProvisioningState enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningStateTypeConverter))] + public partial struct CloudAccountProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Pending".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Pending'", "Pending", global::System.Management.Automation.CompletionResultType.ParameterValue, "Pending"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..e48e72ea22c1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// CloudAccountProvisioningState enum + public partial class CloudAccountProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CloudAccountProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.cs new file mode 100644 index 000000000000..ea7c38978a18 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudAccountProvisioningState.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// CloudAccountProvisioningState enum + public partial struct CloudAccountProvisioningState : + System.IEquatable + { + /// + /// Available - State when Oracle cloud account cloud linking is complete and it is available + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState Available = @"Available"; + + /// Pending - Initial state when Oracle cloud account is not configured + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState Pending = @"Pending"; + + /// Provisioning - State when Oracle cloud account is being provisioned + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState Provisioning = @"Provisioning"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private CloudAccountProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CloudAccountProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CloudAccountProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CloudAccountProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type CloudAccountProvisioningState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CloudAccountProvisioningState && Equals((CloudAccountProvisioningState)obj); + } + + /// Returns hashCode for enum CloudAccountProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CloudAccountProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CloudAccountProvisioningState + /// the value to convert to an instance of . + + public static implicit operator CloudAccountProvisioningState(string value) + { + return new CloudAccountProvisioningState(value); + } + + /// Implicit operator to convert CloudAccountProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum CloudAccountProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CloudAccountProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudAccountProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.Completer.cs new file mode 100644 index 000000000000..8022d7f9ab6d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.Completer.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// CloudExadataInfrastructureLifecycleState enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleStateTypeConverter))] + public partial struct CloudExadataInfrastructureLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminating'", "Terminating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminated'", "Terminated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminated"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MaintenanceInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MaintenanceInProgress'", "MaintenanceInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "MaintenanceInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..98fcc5888c4c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// CloudExadataInfrastructureLifecycleState enum + public partial class CloudExadataInfrastructureLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CloudExadataInfrastructureLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.cs new file mode 100644 index 000000000000..68f6afb4d472 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudExadataInfrastructureLifecycleState.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// CloudExadataInfrastructureLifecycleState enum + public partial struct CloudExadataInfrastructureLifecycleState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState Available = @"Available"; + + /// Indicates that resource in Failed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState Failed = @"Failed"; + + /// Indicates that resource maintenance in progress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState MaintenanceInProgress = @"MaintenanceInProgress"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState Provisioning = @"Provisioning"; + + /// Indicates that resource in Terminated state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState Terminated = @"Terminated"; + + /// Indicates that resource in Terminating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState Terminating = @"Terminating"; + + /// Indicates that resource in Updating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private CloudExadataInfrastructureLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CloudExadataInfrastructureLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CloudExadataInfrastructureLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CloudExadataInfrastructureLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type CloudExadataInfrastructureLifecycleState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CloudExadataInfrastructureLifecycleState && Equals((CloudExadataInfrastructureLifecycleState)obj); + } + + /// Returns hashCode for enum CloudExadataInfrastructureLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CloudExadataInfrastructureLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CloudExadataInfrastructureLifecycleState + /// the value to convert to an instance of . + + public static implicit operator CloudExadataInfrastructureLifecycleState(string value) + { + return new CloudExadataInfrastructureLifecycleState(value); + } + + /// Implicit operator to convert CloudExadataInfrastructureLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum CloudExadataInfrastructureLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CloudExadataInfrastructureLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudExadataInfrastructureLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.Completer.cs new file mode 100644 index 000000000000..f77d1b9f95bb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.Completer.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Cloud VM Cluster lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleStateTypeConverter))] + public partial struct CloudVMClusterLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminating'", "Terminating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminated'", "Terminated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminated"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MaintenanceInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MaintenanceInProgress'", "MaintenanceInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "MaintenanceInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..04a2875975a9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Cloud VM Cluster lifecycle state enum + public partial class CloudVMClusterLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CloudVMClusterLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.cs new file mode 100644 index 000000000000..bd938eb64778 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CloudVMClusterLifecycleState.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Cloud VM Cluster lifecycle state enum + public partial struct CloudVMClusterLifecycleState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState Available = @"Available"; + + /// Indicates that resource in Failed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState Failed = @"Failed"; + + /// Indicates that resource Maintenance in progress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState MaintenanceInProgress = @"MaintenanceInProgress"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState Provisioning = @"Provisioning"; + + /// Indicates that resource in Terminated state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState Terminated = @"Terminated"; + + /// Indicates that resource in Terminating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState Terminating = @"Terminating"; + + /// Indicates that resource in Updating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private CloudVMClusterLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to CloudVMClusterLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CloudVMClusterLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type CloudVMClusterLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CloudVMClusterLifecycleState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CloudVMClusterLifecycleState && Equals((CloudVMClusterLifecycleState)obj); + } + + /// Returns hashCode for enum CloudVMClusterLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CloudVMClusterLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CloudVMClusterLifecycleState + /// the value to convert to an instance of . + + public static implicit operator CloudVMClusterLifecycleState(string value) + { + return new CloudVMClusterLifecycleState(value); + } + + /// Implicit operator to convert CloudVMClusterLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum CloudVMClusterLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CloudVMClusterLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CloudVMClusterLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.Completer.cs new file mode 100644 index 000000000000..3433b96a6a08 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Compute model enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModelTypeConverter))] + public partial struct ComputeModel : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ECPU".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ECPU'", "ECPU", global::System.Management.Automation.CompletionResultType.ParameterValue, "ECPU"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OCPU".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'OCPU'", "OCPU", global::System.Management.Automation.CompletionResultType.ParameterValue, "OCPU"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.TypeConverter.cs new file mode 100644 index 000000000000..9d1ba07d488e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Compute model enum + public partial class ComputeModelTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ComputeModel.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.cs new file mode 100644 index 000000000000..5b814bd2bde3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ComputeModel.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Compute model enum + public partial struct ComputeModel : + System.IEquatable + { + /// ECPU model type + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel Ecpu = @"ECPU"; + + /// OCPU model type + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel Ocpu = @"OCPU"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ComputeModel(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ComputeModel + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ComputeModel(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ComputeModel + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ComputeModel (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ComputeModel && Equals((ComputeModel)obj); + } + + /// Returns hashCode for enum ComputeModel + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ComputeModel + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ComputeModel + /// the value to convert to an instance of . + + public static implicit operator ComputeModel(string value) + { + return new ComputeModel(value); + } + + /// Implicit operator to convert ComputeModel to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel e) + { + return e._value; + } + + /// Overriding != operator for enum ComputeModel + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ComputeModel + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.Completer.cs new file mode 100644 index 000000000000..b1083ac67cdb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Consumer group enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroupTypeConverter))] + public partial struct ConsumerGroup : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "High".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'High'", "High", global::System.Management.Automation.CompletionResultType.ParameterValue, "High"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Medium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Medium'", "Medium", global::System.Management.Automation.CompletionResultType.ParameterValue, "Medium"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Low".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Low'", "Low", global::System.Management.Automation.CompletionResultType.ParameterValue, "Low"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Tp".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Tp'", "Tp", global::System.Management.Automation.CompletionResultType.ParameterValue, "Tp"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Tpurgent".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Tpurgent'", "Tpurgent", global::System.Management.Automation.CompletionResultType.ParameterValue, "Tpurgent"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.TypeConverter.cs new file mode 100644 index 000000000000..f4d086e72c4e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Consumer group enum. + public partial class ConsumerGroupTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConsumerGroup.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.cs new file mode 100644 index 000000000000..579cf8b381b3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ConsumerGroup.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Consumer group enum. + public partial struct ConsumerGroup : + System.IEquatable + { + /// High group + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup High = @"High"; + + /// Low group + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup Low = @"Low"; + + /// Medium group + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup Medium = @"Medium"; + + /// TP group + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup Tp = @"Tp"; + + /// TPurgent group + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup Tpurgent = @"Tpurgent"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ConsumerGroup(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Conversion from arbitrary object to ConsumerGroup + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ConsumerGroup(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ConsumerGroup + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ConsumerGroup (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ConsumerGroup && Equals((ConsumerGroup)obj); + } + + /// Returns hashCode for enum ConsumerGroup + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ConsumerGroup + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ConsumerGroup + /// the value to convert to an instance of . + + public static implicit operator ConsumerGroup(string value) + { + return new ConsumerGroup(value); + } + + /// Implicit operator to convert ConsumerGroup to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup e) + { + return e._value; + } + + /// Overriding != operator for enum ConsumerGroup + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ConsumerGroup + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ConsumerGroup e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.Completer.cs new file mode 100644 index 000000000000..095925af421f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The type of identity that created the resource. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByTypeTypeConverter))] + public partial struct CreatedByType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.TypeConverter.cs new file mode 100644 index 000000000000..6dee7c0be63a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The type of identity that created the resource. + public partial class CreatedByTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CreatedByType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.cs new file mode 100644 index 000000000000..4a1bed16be2b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/CreatedByType.cs @@ -0,0 +1,102 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The type of identity that created the resource. + public partial struct CreatedByType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType Application = @"Application"; + + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType Key = @"Key"; + + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; + + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType User = @"User"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to CreatedByType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CreatedByType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CreatedByType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CreatedByType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CreatedByType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CreatedByType && Equals((CreatedByType)obj); + } + + /// Returns hashCode for enum CreatedByType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CreatedByType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CreatedByType + /// the value to convert to an instance of . + + public static implicit operator CreatedByType(string value) + { + return new CreatedByType(value); + } + + /// Implicit operator to convert CreatedByType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType e) + { + return e._value; + } + + /// Overriding != operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.CreatedByType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.Completer.cs new file mode 100644 index 000000000000..1c8331d98113 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Database type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseTypeTypeConverter))] + public partial struct DataBaseType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Regular".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Regular'", "Regular", global::System.Management.Automation.CompletionResultType.ParameterValue, "Regular"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Clone".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Clone'", "Clone", global::System.Management.Automation.CompletionResultType.ParameterValue, "Clone"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CloneFromBackupTimestamp".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CloneFromBackupTimestamp'", "CloneFromBackupTimestamp", global::System.Management.Automation.CompletionResultType.ParameterValue, "CloneFromBackupTimestamp"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CrossRegionDisasterRecovery".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CrossRegionDisasterRecovery'", "CrossRegionDisasterRecovery", global::System.Management.Automation.CompletionResultType.ParameterValue, "CrossRegionDisasterRecovery"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.TypeConverter.cs new file mode 100644 index 000000000000..79b37c0fbda4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Database type enum + public partial class DataBaseTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DataBaseType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.cs new file mode 100644 index 000000000000..f4188d3455c9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DataBaseType.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Database type enum + public partial struct DataBaseType : + System.IEquatable + { + /// Clone DB + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType Clone = @"Clone"; + + /// Clone DB from backup timestamp + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType CloneFromBackupTimestamp = @"CloneFromBackupTimestamp"; + + /// Cross Region Disaster Recovery + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType CrossRegionDisasterRecovery = @"CrossRegionDisasterRecovery"; + + /// Regular DB + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType Regular = @"Regular"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DataBaseType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DataBaseType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DataBaseType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DataBaseType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DataBaseType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DataBaseType && Equals((DataBaseType)obj); + } + + /// Returns hashCode for enum DataBaseType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DataBaseType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DataBaseType + /// the value to convert to an instance of . + + public static implicit operator DataBaseType(string value) + { + return new DataBaseType(value); + } + + /// Implicit operator to convert DataBaseType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType e) + { + return e._value; + } + + /// Overriding != operator for enum DataBaseType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DataBaseType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.Completer.cs new file mode 100644 index 000000000000..3ba0e10bd117 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DataSafe status type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusTypeTypeConverter))] + public partial struct DataSafeStatusType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Registering".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Registering'", "Registering", global::System.Management.Automation.CompletionResultType.ParameterValue, "Registering"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Registered".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Registered'", "Registered", global::System.Management.Automation.CompletionResultType.ParameterValue, "Registered"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deregistering".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deregistering'", "Deregistering", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deregistering"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotRegistered".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NotRegistered'", "NotRegistered", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotRegistered"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.TypeConverter.cs new file mode 100644 index 000000000000..b96f27fb7c68 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DataSafe status type enum. + public partial class DataSafeStatusTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DataSafeStatusType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.cs new file mode 100644 index 000000000000..6a2afcc08b4a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DataSafeStatusType.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DataSafe status type enum. + public partial struct DataSafeStatusType : + System.IEquatable + { + /// Deregistering status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType Deregistering = @"Deregistering"; + + /// Failed status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType Failed = @"Failed"; + + /// NotRegistered status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType NotRegistered = @"NotRegistered"; + + /// Registered status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType Registered = @"Registered"; + + /// Registering status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType Registering = @"Registering"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DataSafeStatusType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DataSafeStatusType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DataSafeStatusType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DataSafeStatusType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DataSafeStatusType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DataSafeStatusType && Equals((DataSafeStatusType)obj); + } + + /// Returns hashCode for enum DataSafeStatusType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DataSafeStatusType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DataSafeStatusType + /// the value to convert to an instance of . + + public static implicit operator DataSafeStatusType(string value) + { + return new DataSafeStatusType(value); + } + + /// Implicit operator to convert DataSafeStatusType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType e) + { + return e._value; + } + + /// Overriding != operator for enum DataSafeStatusType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DataSafeStatusType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataSafeStatusType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.Completer.cs new file mode 100644 index 000000000000..b31ed5ea2968 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Database edition type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionTypeTypeConverter))] + public partial struct DatabaseEditionType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "StandardEdition".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'StandardEdition'", "StandardEdition", global::System.Management.Automation.CompletionResultType.ParameterValue, "StandardEdition"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EnterpriseEdition".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EnterpriseEdition'", "EnterpriseEdition", global::System.Management.Automation.CompletionResultType.ParameterValue, "EnterpriseEdition"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.TypeConverter.cs new file mode 100644 index 000000000000..addf5592e17f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Database edition type enum. + public partial class DatabaseEditionTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DatabaseEditionType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.cs new file mode 100644 index 000000000000..a08c35bc5b9a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DatabaseEditionType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Database edition type enum. + public partial struct DatabaseEditionType : + System.IEquatable + { + /// Enterprise edition + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType EnterpriseEdition = @"EnterpriseEdition"; + + /// Standard edition + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType StandardEdition = @"StandardEdition"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DatabaseEditionType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DatabaseEditionType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DatabaseEditionType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DatabaseEditionType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DatabaseEditionType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DatabaseEditionType && Equals((DatabaseEditionType)obj); + } + + /// Returns hashCode for enum DatabaseEditionType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DatabaseEditionType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DatabaseEditionType + /// the value to convert to an instance of . + + public static implicit operator DatabaseEditionType(string value) + { + return new DatabaseEditionType(value); + } + + /// Implicit operator to convert DatabaseEditionType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType e) + { + return e._value; + } + + /// Overriding != operator for enum DatabaseEditionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DatabaseEditionType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.Completer.cs new file mode 100644 index 000000000000..3baea1c95a0a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.Completer.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DayOfWeekName enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekNameTypeConverter))] + public partial struct DayOfWeekName : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Monday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Monday'", "Monday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Monday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Tuesday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Tuesday'", "Tuesday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Tuesday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Wednesday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Wednesday'", "Wednesday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Wednesday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Thursday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Thursday'", "Thursday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Thursday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Friday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Friday'", "Friday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Friday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Saturday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Saturday'", "Saturday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Saturday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Sunday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Sunday'", "Sunday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Sunday"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.TypeConverter.cs new file mode 100644 index 000000000000..d2dd6e37d4c0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DayOfWeekName enum + public partial class DayOfWeekNameTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DayOfWeekName.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.cs new file mode 100644 index 000000000000..6514f161ccce --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DayOfWeekName.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DayOfWeekName enum + public partial struct DayOfWeekName : + System.IEquatable + { + /// Friday value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Friday = @"Friday"; + + /// Monday value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Monday = @"Monday"; + + /// Saturday value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Saturday = @"Saturday"; + + /// Sunday value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Sunday = @"Sunday"; + + /// Thursday value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Thursday = @"Thursday"; + + /// Tuesday value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Tuesday = @"Tuesday"; + + /// Wednesday value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName Wednesday = @"Wednesday"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DayOfWeekName + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DayOfWeekName(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DayOfWeekName(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DayOfWeekName + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DayOfWeekName (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DayOfWeekName && Equals((DayOfWeekName)obj); + } + + /// Returns hashCode for enum DayOfWeekName + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DayOfWeekName + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DayOfWeekName + /// the value to convert to an instance of . + + public static implicit operator DayOfWeekName(string value) + { + return new DayOfWeekName(value); + } + + /// Implicit operator to convert DayOfWeekName to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName e) + { + return e._value; + } + + /// Overriding != operator for enum DayOfWeekName + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DayOfWeekName + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.Completer.cs new file mode 100644 index 000000000000..fe966a5bb78d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DbNode action enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnumTypeConverter))] + public partial struct DbNodeActionEnum : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Start".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Start'", "Start", global::System.Management.Automation.CompletionResultType.ParameterValue, "Start"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stop".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stop'", "Stop", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stop"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SoftReset".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SoftReset'", "SoftReset", global::System.Management.Automation.CompletionResultType.ParameterValue, "SoftReset"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Reset".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Reset'", "Reset", global::System.Management.Automation.CompletionResultType.ParameterValue, "Reset"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.TypeConverter.cs new file mode 100644 index 000000000000..ded56d3c472c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DbNode action enum + public partial class DbNodeActionEnumTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DbNodeActionEnum.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.cs new file mode 100644 index 000000000000..375644ba2869 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeActionEnum.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DbNode action enum + public partial struct DbNodeActionEnum : + System.IEquatable + { + /// Reset DbNode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Reset = @"Reset"; + + /// Soft reset DbNode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum SoftReset = @"SoftReset"; + + /// Start DbNode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Start = @"Start"; + + /// Stop DbNode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Stop = @"Stop"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DbNodeActionEnum + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DbNodeActionEnum(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DbNodeActionEnum(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DbNodeActionEnum + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DbNodeActionEnum (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DbNodeActionEnum && Equals((DbNodeActionEnum)obj); + } + + /// Returns hashCode for enum DbNodeActionEnum + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DbNodeActionEnum + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DbNodeActionEnum + /// the value to convert to an instance of . + + public static implicit operator DbNodeActionEnum(string value) + { + return new DbNodeActionEnum(value); + } + + /// Implicit operator to convert DbNodeActionEnum to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum e) + { + return e._value; + } + + /// Overriding != operator for enum DbNodeActionEnum + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DbNodeActionEnum + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.Completer.cs new file mode 100644 index 000000000000..8bf8df7f1e6c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.Completer.cs @@ -0,0 +1,35 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The type of database node maintenance. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceTypeTypeConverter))] + public partial struct DbNodeMaintenanceType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "VmdbRebootMigration".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'VmdbRebootMigration'", "VmdbRebootMigration", global::System.Management.Automation.CompletionResultType.ParameterValue, "VmdbRebootMigration"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.TypeConverter.cs new file mode 100644 index 000000000000..f6d53b26b7e2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The type of database node maintenance. + public partial class DbNodeMaintenanceTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DbNodeMaintenanceType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.cs new file mode 100644 index 000000000000..24eb15b0d548 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeMaintenanceType.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The type of database node maintenance. + public partial struct DbNodeMaintenanceType : + System.IEquatable + { + /// VMDB reboot migration maintenance type + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType VmdbRebootMigration = @"VmdbRebootMigration"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DbNodeMaintenanceType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DbNodeMaintenanceType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DbNodeMaintenanceType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DbNodeMaintenanceType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DbNodeMaintenanceType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DbNodeMaintenanceType && Equals((DbNodeMaintenanceType)obj); + } + + /// Returns hashCode for enum DbNodeMaintenanceType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DbNodeMaintenanceType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DbNodeMaintenanceType + /// the value to convert to an instance of . + + public static implicit operator DbNodeMaintenanceType(string value) + { + return new DbNodeMaintenanceType(value); + } + + /// Implicit operator to convert DbNodeMaintenanceType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType e) + { + return e._value; + } + + /// Overriding != operator for enum DbNodeMaintenanceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DbNodeMaintenanceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeMaintenanceType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.Completer.cs new file mode 100644 index 000000000000..472aef663d98 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.Completer.cs @@ -0,0 +1,67 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DnNode provisioning state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningStateTypeConverter))] + public partial struct DbNodeProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopping".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stopping'", "Stopping", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopping"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Stopped".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Stopped'", "Stopped", global::System.Management.Automation.CompletionResultType.ParameterValue, "Stopped"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Starting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Starting'", "Starting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Starting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminating'", "Terminating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminated'", "Terminated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminated"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..9695bc494467 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DnNode provisioning state enum + public partial class DbNodeProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DbNodeProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.cs new file mode 100644 index 000000000000..46920e98b371 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbNodeProvisioningState.cs @@ -0,0 +1,121 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DnNode provisioning state enum + public partial struct DbNodeProvisioningState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Available = @"Available"; + + /// Indicates that resource in Failed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Failed = @"Failed"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Provisioning = @"Provisioning"; + + /// Indicates that resource in Starting state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Starting = @"Starting"; + + /// Indicates that resource in Stopped state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Stopped = @"Stopped"; + + /// Indicates that resource in Stopping state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Stopping = @"Stopping"; + + /// Indicates that resource in Terminated state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Terminated = @"Terminated"; + + /// Indicates that resource in Terminating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Terminating = @"Terminating"; + + /// Indicates that resource in Updating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState Updating = @"Updating"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DbNodeProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DbNodeProvisioningState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DbNodeProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DbNodeProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DbNodeProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DbNodeProvisioningState && Equals((DbNodeProvisioningState)obj); + } + + /// Returns hashCode for enum DbNodeProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DbNodeProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DbNodeProvisioningState + /// the value to convert to an instance of . + + public static implicit operator DbNodeProvisioningState(string value) + { + return new DbNodeProvisioningState(value); + } + + /// Implicit operator to convert DbNodeProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum DbNodeProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DbNodeProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.Completer.cs new file mode 100644 index 000000000000..fbdb8b144d98 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DB Server patching status enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatusTypeConverter))] + public partial struct DbServerPatchingStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Scheduled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Scheduled'", "Scheduled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Scheduled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MaintenanceInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MaintenanceInProgress'", "MaintenanceInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "MaintenanceInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Complete".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Complete'", "Complete", global::System.Management.Automation.CompletionResultType.ParameterValue, "Complete"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.TypeConverter.cs new file mode 100644 index 000000000000..e7b9f314e128 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DB Server patching status enum + public partial class DbServerPatchingStatusTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DbServerPatchingStatus.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.cs new file mode 100644 index 000000000000..bd934801f5be --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerPatchingStatus.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DB Server patching status enum + public partial struct DbServerPatchingStatus : + System.IEquatable + { + /// Patching completed + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus Complete = @"Complete"; + + /// Patching failed + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus Failed = @"Failed"; + + /// Patching in progress + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus MaintenanceInProgress = @"MaintenanceInProgress"; + + /// Patching scheduled + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus Scheduled = @"Scheduled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DbServerPatchingStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DbServerPatchingStatus(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DbServerPatchingStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DbServerPatchingStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DbServerPatchingStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DbServerPatchingStatus && Equals((DbServerPatchingStatus)obj); + } + + /// Returns hashCode for enum DbServerPatchingStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DbServerPatchingStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DbServerPatchingStatus + /// the value to convert to an instance of . + + public static implicit operator DbServerPatchingStatus(string value) + { + return new DbServerPatchingStatus(value); + } + + /// Implicit operator to convert DbServerPatchingStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus e) + { + return e._value; + } + + /// Overriding != operator for enum DbServerPatchingStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DbServerPatchingStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerPatchingStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.Completer.cs new file mode 100644 index 000000000000..dcf592d9fc07 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DbServerProvisioningState enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningStateTypeConverter))] + public partial struct DbServerProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unavailable".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Unavailable'", "Unavailable", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unavailable"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleted'", "Deleted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleted"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MaintenanceInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MaintenanceInProgress'", "MaintenanceInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "MaintenanceInProgress"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..b8746a3cf6c4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DbServerProvisioningState enum + public partial class DbServerProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DbServerProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.cs new file mode 100644 index 000000000000..5cbf3ceed805 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DbServerProvisioningState.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DbServerProvisioningState enum + public partial struct DbServerProvisioningState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState Available = @"Available"; + + /// Indicates that resource in Creating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState Creating = @"Creating"; + + /// Indicates that resource in Deleted state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState Deleted = @"Deleted"; + + /// Indicates that resource in Deleting state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState Deleting = @"Deleting"; + + /// Indicates that resource maintenance in progress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState MaintenanceInProgress = @"MaintenanceInProgress"; + + /// Indicates that resource in Unavailable state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState Unavailable = @"Unavailable"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DbServerProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DbServerProvisioningState(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DbServerProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DbServerProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DbServerProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DbServerProvisioningState && Equals((DbServerProvisioningState)obj); + } + + /// Returns hashCode for enum DbServerProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DbServerProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DbServerProvisioningState + /// the value to convert to an instance of . + + public static implicit operator DbServerProvisioningState(string value) + { + return new DbServerProvisioningState(value); + } + + /// Implicit operator to convert DbServerProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum DbServerProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DbServerProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbServerProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.Completer.cs new file mode 100644 index 000000000000..14d28d88cff2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Disaster recovery type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryTypeTypeConverter))] + public partial struct DisasterRecoveryType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Adg".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Adg'", "Adg", global::System.Management.Automation.CompletionResultType.ParameterValue, "Adg"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BackupBased".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BackupBased'", "BackupBased", global::System.Management.Automation.CompletionResultType.ParameterValue, "BackupBased"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.TypeConverter.cs new file mode 100644 index 000000000000..5c9db35099a5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Disaster recovery type enum. + public partial class DisasterRecoveryTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DisasterRecoveryType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.cs new file mode 100644 index 000000000000..784c6ef1ae54 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DisasterRecoveryType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Disaster recovery type enum. + public partial struct DisasterRecoveryType : + System.IEquatable + { + /// ADG type + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType Adg = @"Adg"; + + /// Backup based type + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType BackupBased = @"BackupBased"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DisasterRecoveryType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DisasterRecoveryType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DisasterRecoveryType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DisasterRecoveryType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DisasterRecoveryType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DisasterRecoveryType && Equals((DisasterRecoveryType)obj); + } + + /// Returns hashCode for enum DisasterRecoveryType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DisasterRecoveryType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DisasterRecoveryType + /// the value to convert to an instance of . + + public static implicit operator DisasterRecoveryType(string value) + { + return new DisasterRecoveryType(value); + } + + /// Implicit operator to convert DisasterRecoveryType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType e) + { + return e._value; + } + + /// Overriding != operator for enum DisasterRecoveryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DisasterRecoveryType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.Completer.cs new file mode 100644 index 000000000000..d9aecd17e2c5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Disk redundancy enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancyTypeConverter))] + public partial struct DiskRedundancy : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "High".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'High'", "High", global::System.Management.Automation.CompletionResultType.ParameterValue, "High"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Normal".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Normal'", "Normal", global::System.Management.Automation.CompletionResultType.ParameterValue, "Normal"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.TypeConverter.cs new file mode 100644 index 000000000000..d17723d82894 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Disk redundancy enum + public partial class DiskRedundancyTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DiskRedundancy.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.cs new file mode 100644 index 000000000000..14ef5d95092c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DiskRedundancy.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Disk redundancy enum + public partial struct DiskRedundancy : + System.IEquatable + { + /// High redundancy + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy High = @"High"; + + /// Normal redundancy + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy Normal = @"Normal"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to DiskRedundancy + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DiskRedundancy(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private DiskRedundancy(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DiskRedundancy + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type DiskRedundancy (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DiskRedundancy && Equals((DiskRedundancy)obj); + } + + /// Returns hashCode for enum DiskRedundancy + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DiskRedundancy + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DiskRedundancy + /// the value to convert to an instance of . + + public static implicit operator DiskRedundancy(string value) + { + return new DiskRedundancy(value); + } + + /// Implicit operator to convert DiskRedundancy to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy e) + { + return e._value; + } + + /// Overriding != operator for enum DiskRedundancy + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DiskRedundancy + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DiskRedundancy e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.Completer.cs new file mode 100644 index 000000000000..72daed20a103 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DNS Private Views lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleStateTypeConverter))] + public partial struct DnsPrivateViewsLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleted'", "Deleted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleted"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..a97f28cb0ff0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DNS Private Views lifecycle state enum + public partial class DnsPrivateViewsLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DnsPrivateViewsLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.cs new file mode 100644 index 000000000000..457fb044b4ac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateViewsLifecycleState.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DNS Private Views lifecycle state enum + public partial struct DnsPrivateViewsLifecycleState : + System.IEquatable + { + /// DNS Private View is active + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState Active = @"Active"; + + /// DNS Private View is deleted + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState Deleted = @"Deleted"; + + /// DNS Private View is deleting + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState Deleting = @"Deleting"; + + /// DNS Private View is updating + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to DnsPrivateViewsLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DnsPrivateViewsLifecycleState(global::System.Convert.ToString(value)); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private DnsPrivateViewsLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DnsPrivateViewsLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type DnsPrivateViewsLifecycleState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DnsPrivateViewsLifecycleState && Equals((DnsPrivateViewsLifecycleState)obj); + } + + /// Returns hashCode for enum DnsPrivateViewsLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DnsPrivateViewsLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DnsPrivateViewsLifecycleState + /// the value to convert to an instance of . + + public static implicit operator DnsPrivateViewsLifecycleState(string value) + { + return new DnsPrivateViewsLifecycleState(value); + } + + /// Implicit operator to convert DnsPrivateViewsLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum DnsPrivateViewsLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DnsPrivateViewsLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateViewsLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.Completer.cs new file mode 100644 index 000000000000..b2ca232ac57b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DNS Private Zones lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleStateTypeConverter))] + public partial struct DnsPrivateZonesLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Active".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Active'", "Active", global::System.Management.Automation.CompletionResultType.ParameterValue, "Active"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Creating'", "Creating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Creating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleted'", "Deleted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleted"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..bc52b0348939 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DNS Private Zones lifecycle state enum + public partial class DnsPrivateZonesLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => DnsPrivateZonesLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.cs new file mode 100644 index 000000000000..4f8f5dfc8cf9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/DnsPrivateZonesLifecycleState.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// DNS Private Zones lifecycle state enum + public partial struct DnsPrivateZonesLifecycleState : + System.IEquatable + { + /// DNS Private Zones is active + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState Active = @"Active"; + + /// DNS Private Zones is creating + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState Creating = @"Creating"; + + /// DNS Private Zones is deleted + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState Deleted = @"Deleted"; + + /// DNS Private Zones is deleting + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState Deleting = @"Deleting"; + + /// DNS Private Zones is updating + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to DnsPrivateZonesLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new DnsPrivateZonesLifecycleState(global::System.Convert.ToString(value)); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private DnsPrivateZonesLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type DnsPrivateZonesLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type DnsPrivateZonesLifecycleState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is DnsPrivateZonesLifecycleState && Equals((DnsPrivateZonesLifecycleState)obj); + } + + /// Returns hashCode for enum DnsPrivateZonesLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for DnsPrivateZonesLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to DnsPrivateZonesLifecycleState + /// the value to convert to an instance of . + + public static implicit operator DnsPrivateZonesLifecycleState(string value) + { + return new DnsPrivateZonesLifecycleState(value); + } + + /// Implicit operator to convert DnsPrivateZonesLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum DnsPrivateZonesLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum DnsPrivateZonesLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DnsPrivateZonesLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.Completer.cs new file mode 100644 index 000000000000..45d8b9b5aa34 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.Completer.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Exadata VM cluster on Exascale Infrastructure lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleStateTypeConverter))] + public partial struct ExadbVMClusterLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminating'", "Terminating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminated'", "Terminated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminated"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MaintenanceInProgress".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MaintenanceInProgress'", "MaintenanceInProgress", global::System.Management.Automation.CompletionResultType.ParameterValue, "MaintenanceInProgress"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..c600b2e4f2ec --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Exadata VM cluster on Exascale Infrastructure lifecycle state enum + public partial class ExadbVMClusterLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ExadbVMClusterLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.cs new file mode 100644 index 000000000000..b7b92fb39171 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ExadbVMClusterLifecycleState.cs @@ -0,0 +1,119 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Exadata VM cluster on Exascale Infrastructure lifecycle state enum + public partial struct ExadbVMClusterLifecycleState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState Available = @"Available"; + + /// Indicates that resource in Failed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState Failed = @"Failed"; + + /// Indicates that resource Maintenance in progress state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState MaintenanceInProgress = @"MaintenanceInProgress"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState Provisioning = @"Provisioning"; + + /// Indicates that resource in Terminated state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState Terminated = @"Terminated"; + + /// Indicates that resource in Terminating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState Terminating = @"Terminating"; + + /// Indicates that resource in Updating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to ExadbVMClusterLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ExadbVMClusterLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ExadbVMClusterLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ExadbVMClusterLifecycleState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ExadbVMClusterLifecycleState && Equals((ExadbVMClusterLifecycleState)obj); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ExadbVMClusterLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum ExadbVMClusterLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ExadbVMClusterLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ExadbVMClusterLifecycleState + /// the value to convert to an instance of . + + public static implicit operator ExadbVMClusterLifecycleState(string value) + { + return new ExadbVMClusterLifecycleState(value); + } + + /// Implicit operator to convert ExadbVMClusterLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum ExadbVMClusterLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ExadbVMClusterLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExadbVMClusterLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.Completer.cs new file mode 100644 index 000000000000..02684e6fa273 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Exadata Database Storage Vault lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleStateTypeConverter))] + public partial struct ExascaleDbStorageVaultLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminating'", "Terminating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminated'", "Terminated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminated"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..6cd4b9c6d43b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Exadata Database Storage Vault lifecycle state enum + public partial class ExascaleDbStorageVaultLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ExascaleDbStorageVaultLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.cs new file mode 100644 index 000000000000..b380046aa5a2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ExascaleDbStorageVaultLifecycleState.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Exadata Database Storage Vault lifecycle state enum + public partial struct ExascaleDbStorageVaultLifecycleState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState Available = @"Available"; + + /// Indicates that resource in Failed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState Failed = @"Failed"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState Provisioning = @"Provisioning"; + + /// Indicates that resource in Terminated state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState Terminated = @"Terminated"; + + /// Indicates that resource in Terminating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState Terminating = @"Terminating"; + + /// Indicates that resource in Updating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to ExascaleDbStorageVaultLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ExascaleDbStorageVaultLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ExascaleDbStorageVaultLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ExascaleDbStorageVaultLifecycleState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ExascaleDbStorageVaultLifecycleState && Equals((ExascaleDbStorageVaultLifecycleState)obj); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ExascaleDbStorageVaultLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum ExascaleDbStorageVaultLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ExascaleDbStorageVaultLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ExascaleDbStorageVaultLifecycleState + /// the value to convert to an instance of . + + public static implicit operator ExascaleDbStorageVaultLifecycleState(string value) + { + return new ExascaleDbStorageVaultLifecycleState(value); + } + + /// Implicit operator to convert ExascaleDbStorageVaultLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum ExascaleDbStorageVaultLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ExascaleDbStorageVaultLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ExascaleDbStorageVaultLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.Completer.cs new file mode 100644 index 000000000000..6b59cf9027ca --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Generate type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateTypeTypeConverter))] + public partial struct GenerateType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Single".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Single'", "Single", global::System.Management.Automation.CompletionResultType.ParameterValue, "Single"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "All".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'All'", "All", global::System.Management.Automation.CompletionResultType.ParameterValue, "All"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.TypeConverter.cs new file mode 100644 index 000000000000..cab0884a345d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Generate type enum + public partial class GenerateTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GenerateType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.cs new file mode 100644 index 000000000000..317e7f16d83d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/GenerateType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Generate type enum + public partial struct GenerateType : + System.IEquatable + { + /// Generate all + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType All = @"All"; + + /// Generate single + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType Single = @"Single"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to GenerateType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new GenerateType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type GenerateType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type GenerateType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is GenerateType && Equals((GenerateType)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private GenerateType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum GenerateType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for GenerateType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to GenerateType + /// the value to convert to an instance of . + + public static implicit operator GenerateType(string value) + { + return new GenerateType(value); + } + + /// Implicit operator to convert GenerateType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType e) + { + return e._value; + } + + /// Overriding != operator for enum GenerateType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum GenerateType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.Completer.cs new file mode 100644 index 000000000000..010f96b67ded --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// GridImageType enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageTypeTypeConverter))] + public partial struct GridImageType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ReleaseUpdate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ReleaseUpdate'", "ReleaseUpdate", global::System.Management.Automation.CompletionResultType.ParameterValue, "ReleaseUpdate"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CustomImage".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CustomImage'", "CustomImage", global::System.Management.Automation.CompletionResultType.ParameterValue, "CustomImage"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.TypeConverter.cs new file mode 100644 index 000000000000..c67a5e88668c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// GridImageType enum + public partial class GridImageTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GridImageType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.cs new file mode 100644 index 000000000000..bdd253ccb087 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/GridImageType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// GridImageType enum + public partial struct GridImageType : + System.IEquatable + { + /// Custom image + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType CustomImage = @"CustomImage"; + + /// Release update + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType ReleaseUpdate = @"ReleaseUpdate"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to GridImageType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new GridImageType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type GridImageType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type GridImageType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is GridImageType && Equals((GridImageType)obj); + } + + /// Returns hashCode for enum GridImageType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private GridImageType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for GridImageType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to GridImageType + /// the value to convert to an instance of . + + public static implicit operator GridImageType(string value) + { + return new GridImageType(value); + } + + /// Implicit operator to convert GridImageType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType e) + { + return e._value; + } + + /// Overriding != operator for enum GridImageType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum GridImageType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GridImageType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.Completer.cs new file mode 100644 index 000000000000..addba6164780 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Hardware Type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareTypeTypeConverter))] + public partial struct HardwareType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "COMPUTE".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'COMPUTE'", "COMPUTE", global::System.Management.Automation.CompletionResultType.ParameterValue, "COMPUTE"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CELL".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CELL'", "CELL", global::System.Management.Automation.CompletionResultType.ParameterValue, "CELL"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.TypeConverter.cs new file mode 100644 index 000000000000..d98a45e99105 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Hardware Type enum + public partial class HardwareTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => HardwareType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.cs new file mode 100644 index 000000000000..b4e310c37eec --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/HardwareType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Hardware Type enum + public partial struct HardwareType : + System.IEquatable + { + /// Hardware type is Storage Server + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType Cell = @"CELL"; + + /// Hardware type is Database Server + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType Compute = @"COMPUTE"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HardwareType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HardwareType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HardwareType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HardwareType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HardwareType && Equals((HardwareType)obj); + } + + /// Returns hashCode for enum HardwareType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HardwareType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HardwareType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HardwareType + /// the value to convert to an instance of . + + public static implicit operator HardwareType(string value) + { + return new HardwareType(value); + } + + /// Implicit operator to convert HardwareType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType e) + { + return e._value; + } + + /// Overriding != operator for enum HardwareType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HardwareType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HardwareType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.Completer.cs new file mode 100644 index 000000000000..4f46d1bde77a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Host format type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatTypeTypeConverter))] + public partial struct HostFormatType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Fqdn".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Fqdn'", "Fqdn", global::System.Management.Automation.CompletionResultType.ParameterValue, "Fqdn"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Ip".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Ip'", "Ip", global::System.Management.Automation.CompletionResultType.ParameterValue, "Ip"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.TypeConverter.cs new file mode 100644 index 000000000000..26d88cb0b734 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Host format type enum. + public partial class HostFormatTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => HostFormatType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.cs new file mode 100644 index 000000000000..5ba33f5e1d76 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/HostFormatType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Host format type enum. + public partial struct HostFormatType : + System.IEquatable + { + /// FQDN format + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType Fqdn = @"Fqdn"; + + /// IP format + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType IP = @"Ip"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to HostFormatType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new HostFormatType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type HostFormatType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type HostFormatType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is HostFormatType && Equals((HostFormatType)obj); + } + + /// Returns hashCode for enum HostFormatType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private HostFormatType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for HostFormatType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to HostFormatType + /// the value to convert to an instance of . + + public static implicit operator HostFormatType(string value) + { + return new HostFormatType(value); + } + + /// Implicit operator to convert HostFormatType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType e) + { + return e._value; + } + + /// Overriding != operator for enum HostFormatType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum HostFormatType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.HostFormatType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.Completer.cs new file mode 100644 index 000000000000..5bc0557ce40e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Intent enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IntentTypeConverter))] + public partial struct Intent : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Retain".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Retain'", "Retain", global::System.Management.Automation.CompletionResultType.ParameterValue, "Retain"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Reset".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Reset'", "Reset", global::System.Management.Automation.CompletionResultType.ParameterValue, "Reset"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.TypeConverter.cs new file mode 100644 index 000000000000..82a2abb111ce --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Intent enum + public partial class IntentTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Intent.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.cs new file mode 100644 index 000000000000..756cfed86a70 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Intent.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Intent enum + public partial struct Intent : + System.IEquatable + { + /// Reset intent + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent Reset = @"Reset"; + + /// Retain intent + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent Retain = @"Retain"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Intent + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Intent(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Intent + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Intent (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Intent && Equals((Intent)obj); + } + + /// Returns hashCode for enum Intent + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Intent(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Intent + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Intent + /// the value to convert to an instance of . + + public static implicit operator Intent(string value) + { + return new Intent(value); + } + + /// Implicit operator to convert Intent to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent e) + { + return e._value; + } + + /// Overriding != operator for enum Intent + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Intent + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.Completer.cs new file mode 100644 index 000000000000..e74901c79c93 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// ORM lifecycle state enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleStateTypeConverter))] + public partial struct IormLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BootStrapping".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BootStrapping'", "BootStrapping", global::System.Management.Automation.CompletionResultType.ParameterValue, "BootStrapping"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..4f594118e5ce --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// ORM lifecycle state enum + public partial class IormLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => IormLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.cs new file mode 100644 index 000000000000..d9fb13ee6d68 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/IormLifecycleState.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// ORM lifecycle state enum + public partial struct IormLifecycleState : + System.IEquatable + { + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState BootStrapping = @"BootStrapping"; + + /// Indicates that resource in Disabled state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState Disabled = @"Disabled"; + + /// Indicates that resource in Enabled state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState Enabled = @"Enabled"; + + /// Indicates that resource in Failed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState Failed = @"Failed"; + + /// Indicates that resource in Updating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState Updating = @"Updating"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to IormLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new IormLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type IormLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type IormLifecycleState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is IormLifecycleState && Equals((IormLifecycleState)obj); + } + + /// Returns hashCode for enum IormLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private IormLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for IormLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to IormLifecycleState + /// the value to convert to an instance of . + + public static implicit operator IormLifecycleState(string value) + { + return new IormLifecycleState(value); + } + + /// Implicit operator to convert IormLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum IormLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum IormLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.IormLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.Completer.cs new file mode 100644 index 000000000000..6bbd86eac521 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// LicenseModel enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModelTypeConverter))] + public partial struct LicenseModel : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LicenseIncluded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LicenseIncluded'", "LicenseIncluded", global::System.Management.Automation.CompletionResultType.ParameterValue, "LicenseIncluded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BringYourOwnLicense".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BringYourOwnLicense'", "BringYourOwnLicense", global::System.Management.Automation.CompletionResultType.ParameterValue, "BringYourOwnLicense"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.TypeConverter.cs new file mode 100644 index 000000000000..c0bdb90af37c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// LicenseModel enum + public partial class LicenseModelTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => LicenseModel.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.cs new file mode 100644 index 000000000000..8507b0ab94c7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/LicenseModel.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// LicenseModel enum + public partial struct LicenseModel : + System.IEquatable + { + /// Bring Your Own License + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel BringYourOwnLicense = @"BringYourOwnLicense"; + + /// License included + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseIncluded = @"LicenseIncluded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to LicenseModel + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new LicenseModel(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type LicenseModel + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type LicenseModel (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is LicenseModel && Equals((LicenseModel)obj); + } + + /// Returns hashCode for enum LicenseModel + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private LicenseModel(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for LicenseModel + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to LicenseModel + /// the value to convert to an instance of . + + public static implicit operator LicenseModel(string value) + { + return new LicenseModel(value); + } + + /// Implicit operator to convert LicenseModel to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel e) + { + return e._value; + } + + /// Overriding != operator for enum LicenseModel + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum LicenseModel + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.Completer.cs new file mode 100644 index 000000000000..dcf016d04eb2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.Completer.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// MonthName enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthNameTypeConverter))] + public partial struct MonthName : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "January".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'January'", "January", global::System.Management.Automation.CompletionResultType.ParameterValue, "January"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "February".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'February'", "February", global::System.Management.Automation.CompletionResultType.ParameterValue, "February"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "March".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'March'", "March", global::System.Management.Automation.CompletionResultType.ParameterValue, "March"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "April".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'April'", "April", global::System.Management.Automation.CompletionResultType.ParameterValue, "April"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "May".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'May'", "May", global::System.Management.Automation.CompletionResultType.ParameterValue, "May"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "June".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'June'", "June", global::System.Management.Automation.CompletionResultType.ParameterValue, "June"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "July".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'July'", "July", global::System.Management.Automation.CompletionResultType.ParameterValue, "July"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "August".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'August'", "August", global::System.Management.Automation.CompletionResultType.ParameterValue, "August"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "September".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'September'", "September", global::System.Management.Automation.CompletionResultType.ParameterValue, "September"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "October".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'October'", "October", global::System.Management.Automation.CompletionResultType.ParameterValue, "October"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "November".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'November'", "November", global::System.Management.Automation.CompletionResultType.ParameterValue, "November"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "December".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'December'", "December", global::System.Management.Automation.CompletionResultType.ParameterValue, "December"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.TypeConverter.cs new file mode 100644 index 000000000000..6af7f81e5f3b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// MonthName enum + public partial class MonthNameTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => MonthName.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.cs new file mode 100644 index 000000000000..4495b2dd3713 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/MonthName.cs @@ -0,0 +1,130 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// MonthName enum + public partial struct MonthName : + System.IEquatable + { + /// April value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName April = @"April"; + + /// August value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName August = @"August"; + + /// December value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName December = @"December"; + + /// February value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName February = @"February"; + + /// January value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName January = @"January"; + + /// July value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName July = @"July"; + + /// June value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName June = @"June"; + + /// March value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName March = @"March"; + + /// May value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName May = @"May"; + + /// November value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName November = @"November"; + + /// October value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName October = @"October"; + + /// September value + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName September = @"September"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to MonthName + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new MonthName(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type MonthName + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type MonthName (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is MonthName && Equals((MonthName)obj); + } + + /// Returns hashCode for enum MonthName + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private MonthName(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for MonthName + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to MonthName + /// the value to convert to an instance of . + + public static implicit operator MonthName(string value) + { + return new MonthName(value); + } + + /// Implicit operator to convert MonthName to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName e) + { + return e._value; + } + + /// Overriding != operator for enum MonthName + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum MonthName + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.MonthName e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.Completer.cs new file mode 100644 index 000000000000..a33dde510113 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Objective enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ObjectiveTypeConverter))] + public partial struct Objective : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "LowLatency".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'LowLatency'", "LowLatency", global::System.Management.Automation.CompletionResultType.ParameterValue, "LowLatency"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "HighThroughput".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'HighThroughput'", "HighThroughput", global::System.Management.Automation.CompletionResultType.ParameterValue, "HighThroughput"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Balanced".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Balanced'", "Balanced", global::System.Management.Automation.CompletionResultType.ParameterValue, "Balanced"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Auto".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Auto'", "Auto", global::System.Management.Automation.CompletionResultType.ParameterValue, "Auto"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Basic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Basic'", "Basic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Basic"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.TypeConverter.cs new file mode 100644 index 000000000000..cdea525c9e8a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Objective enum + public partial class ObjectiveTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Objective.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.cs new file mode 100644 index 000000000000..e4354f5c542e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Objective.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Objective enum + public partial struct Objective : + System.IEquatable + { + /// Auto objective + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective Auto = @"Auto"; + + /// Balanced objective + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective Balanced = @"Balanced"; + + /// Basic objective + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective Basic = @"Basic"; + + /// High throughput objective + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective HighThroughput = @"HighThroughput"; + + /// Low latency objective + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective LowLatency = @"LowLatency"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Objective + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Objective(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Objective + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Objective (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Objective && Equals((Objective)obj); + } + + /// Returns hashCode for enum Objective + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Objective(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Objective + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Objective + /// the value to convert to an instance of . + + public static implicit operator Objective(string value) + { + return new Objective(value); + } + + /// Implicit operator to convert Objective to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective e) + { + return e._value; + } + + /// Overriding != operator for enum Objective + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Objective + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Objective e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.Completer.cs new file mode 100644 index 000000000000..40af2f40898b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Open mode type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeTypeTypeConverter))] + public partial struct OpenModeType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ReadOnly".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ReadOnly'", "ReadOnly", global::System.Management.Automation.CompletionResultType.ParameterValue, "ReadOnly"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ReadWrite".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ReadWrite'", "ReadWrite", global::System.Management.Automation.CompletionResultType.ParameterValue, "ReadWrite"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.TypeConverter.cs new file mode 100644 index 000000000000..050722db82a4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Open mode type enum. + public partial class OpenModeTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => OpenModeType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.cs new file mode 100644 index 000000000000..60d42d03862f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OpenModeType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Open mode type enum. + public partial struct OpenModeType : + System.IEquatable + { + /// ReadOnly mode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType ReadOnly = @"ReadOnly"; + + /// ReadWrite mode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType ReadWrite = @"ReadWrite"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to OpenModeType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OpenModeType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OpenModeType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OpenModeType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OpenModeType && Equals((OpenModeType)obj); + } + + /// Returns hashCode for enum OpenModeType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private OpenModeType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OpenModeType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OpenModeType + /// the value to convert to an instance of . + + public static implicit operator OpenModeType(string value) + { + return new OpenModeType(value); + } + + /// Implicit operator to convert OpenModeType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType e) + { + return e._value; + } + + /// Overriding != operator for enum OpenModeType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OpenModeType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.Completer.cs new file mode 100644 index 000000000000..91a2fe5baccd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Operations Insights status type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusTypeTypeConverter))] + public partial struct OperationsInsightsStatusType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabling'", "Enabling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabling"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabling'", "Disabling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabling"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotEnabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NotEnabled'", "NotEnabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotEnabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "FailedEnabling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'FailedEnabling'", "FailedEnabling", global::System.Management.Automation.CompletionResultType.ParameterValue, "FailedEnabling"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "FailedDisabling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'FailedDisabling'", "FailedDisabling", global::System.Management.Automation.CompletionResultType.ParameterValue, "FailedDisabling"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.TypeConverter.cs new file mode 100644 index 000000000000..acfd32c785a8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Operations Insights status type enum. + public partial class OperationsInsightsStatusTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => OperationsInsightsStatusType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.cs new file mode 100644 index 000000000000..83f2d7c06ccb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OperationsInsightsStatusType.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Operations Insights status type enum. + public partial struct OperationsInsightsStatusType : + System.IEquatable + { + /// Disabling status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType Disabling = @"Disabling"; + + /// Enabled status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType Enabled = @"Enabled"; + + /// Enabling status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType Enabling = @"Enabling"; + + /// FailedDisabling status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType FailedDisabling = @"FailedDisabling"; + + /// FailedEnabling status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType FailedEnabling = @"FailedEnabling"; + + /// NotEnabled status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType NotEnabled = @"NotEnabled"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to OperationsInsightsStatusType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OperationsInsightsStatusType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OperationsInsightsStatusType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type OperationsInsightsStatusType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OperationsInsightsStatusType && Equals((OperationsInsightsStatusType)obj); + } + + /// Returns hashCode for enum OperationsInsightsStatusType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private OperationsInsightsStatusType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OperationsInsightsStatusType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OperationsInsightsStatusType + /// the value to convert to an instance of . + + public static implicit operator OperationsInsightsStatusType(string value) + { + return new OperationsInsightsStatusType(value); + } + + /// Implicit operator to convert OperationsInsightsStatusType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType e) + { + return e._value; + } + + /// Overriding != operator for enum OperationsInsightsStatusType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OperationsInsightsStatusType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OperationsInsightsStatusType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.Completer.cs new file mode 100644 index 000000000000..dc54ab0454b8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// OracleSubscriptionProvisioningState enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningStateTypeConverter))] + public partial struct OracleSubscriptionProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..fcbab9406ae0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// OracleSubscriptionProvisioningState enum + public partial class OracleSubscriptionProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => OracleSubscriptionProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.cs new file mode 100644 index 000000000000..cbf257840b7a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/OracleSubscriptionProvisioningState.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// OracleSubscriptionProvisioningState enum + public partial struct OracleSubscriptionProvisioningState : + System.IEquatable + { + /// Resource creation was canceled. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState Canceled = @"Canceled"; + + /// Resource creation failed. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState Failed = @"Failed"; + + /// Resource has been created. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState Succeeded = @"Succeeded"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to OracleSubscriptionProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new OracleSubscriptionProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type OracleSubscriptionProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type OracleSubscriptionProvisioningState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is OracleSubscriptionProvisioningState && Equals((OracleSubscriptionProvisioningState)obj); + } + + /// Returns hashCode for enum OracleSubscriptionProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private OracleSubscriptionProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for OracleSubscriptionProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to OracleSubscriptionProvisioningState + /// the value to convert to an instance of . + + public static implicit operator OracleSubscriptionProvisioningState(string value) + { + return new OracleSubscriptionProvisioningState(value); + } + + /// Implicit operator to convert OracleSubscriptionProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum OracleSubscriptionProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum OracleSubscriptionProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OracleSubscriptionProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.Completer.cs new file mode 100644 index 000000000000..590c79a76bcc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.Completer.cs @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OriginTypeConverter))] + public partial struct Origin : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "user".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'user'", "user", global::System.Management.Automation.CompletionResultType.ParameterValue, "user"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "system".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'system'", "system", global::System.Management.Automation.CompletionResultType.ParameterValue, "system"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "user,system".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'user,system'", "user,system", global::System.Management.Automation.CompletionResultType.ParameterValue, "user,system"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.TypeConverter.cs new file mode 100644 index 000000000000..15774c553611 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.TypeConverter.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + public partial class OriginTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Origin.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.cs new file mode 100644 index 000000000000..e1d0c0ee3428 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Origin.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// + /// The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default value is + /// "user,system" + /// + public partial struct Origin : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin System = @"system"; + + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin User = @"user"; + + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin UserSystem = @"user,system"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Origin + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Origin(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Origin + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Origin (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Origin && Equals((Origin)obj); + } + + /// Returns hashCode for enum Origin + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Origin(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Origin + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Origin + /// the value to convert to an instance of . + + public static implicit operator Origin(string value) + { + return new Origin(value); + } + + /// Implicit operator to convert Origin to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin e) + { + return e._value; + } + + /// Overriding != operator for enum Origin + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Origin + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Origin e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.Completer.cs new file mode 100644 index 000000000000..e35b4955843f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Patching mode enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingModeTypeConverter))] + public partial struct PatchingMode : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Rolling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Rolling'", "Rolling", global::System.Management.Automation.CompletionResultType.ParameterValue, "Rolling"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NonRolling".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NonRolling'", "NonRolling", global::System.Management.Automation.CompletionResultType.ParameterValue, "NonRolling"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.TypeConverter.cs new file mode 100644 index 000000000000..bdae57fcd7b4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Patching mode enum + public partial class PatchingModeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PatchingMode.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.cs new file mode 100644 index 000000000000..511ebeb59a1e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/PatchingMode.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Patching mode enum + public partial struct PatchingMode : + System.IEquatable + { + /// Non Rolling patching + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode NonRolling = @"NonRolling"; + + /// Rolling patching + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode Rolling = @"Rolling"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PatchingMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PatchingMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PatchingMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PatchingMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PatchingMode && Equals((PatchingMode)obj); + } + + /// Returns hashCode for enum PatchingMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PatchingMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PatchingMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PatchingMode + /// the value to convert to an instance of . + + public static implicit operator PatchingMode(string value) + { + return new PatchingMode(value); + } + + /// Implicit operator to convert PatchingMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode e) + { + return e._value; + } + + /// Overriding != operator for enum PatchingMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PatchingMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.Completer.cs new file mode 100644 index 000000000000..2a834da0f0ad --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Permission level type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelTypeTypeConverter))] + public partial struct PermissionLevelType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Restricted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Restricted'", "Restricted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Restricted"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Unrestricted".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Unrestricted'", "Unrestricted", global::System.Management.Automation.CompletionResultType.ParameterValue, "Unrestricted"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.TypeConverter.cs new file mode 100644 index 000000000000..00d5959949e9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Permission level type enum. + public partial class PermissionLevelTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => PermissionLevelType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.cs new file mode 100644 index 000000000000..e25f4fd49cf3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/PermissionLevelType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Permission level type enum. + public partial struct PermissionLevelType : + System.IEquatable + { + /// Restricted permission level + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType Restricted = @"Restricted"; + + /// Unrestricted permission level + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType Unrestricted = @"Unrestricted"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PermissionLevelType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PermissionLevelType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PermissionLevelType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PermissionLevelType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PermissionLevelType && Equals((PermissionLevelType)obj); + } + + /// Returns hashCode for enum PermissionLevelType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PermissionLevelType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PermissionLevelType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PermissionLevelType + /// the value to convert to an instance of . + + public static implicit operator PermissionLevelType(string value) + { + return new PermissionLevelType(value); + } + + /// Implicit operator to convert PermissionLevelType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType e) + { + return e._value; + } + + /// Overriding != operator for enum PermissionLevelType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PermissionLevelType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.Completer.cs new file mode 100644 index 000000000000..adce34bd4a4d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Preference enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PreferenceTypeConverter))] + public partial struct Preference : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NoPreference".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NoPreference'", "NoPreference", global::System.Management.Automation.CompletionResultType.ParameterValue, "NoPreference"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CustomPreference".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CustomPreference'", "CustomPreference", global::System.Management.Automation.CompletionResultType.ParameterValue, "CustomPreference"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.TypeConverter.cs new file mode 100644 index 000000000000..f50b23117b46 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Preference enum + public partial class PreferenceTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => Preference.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.cs new file mode 100644 index 000000000000..1eb969ff88d0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/Preference.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Preference enum + public partial struct Preference : + System.IEquatable + { + /// Custom preference + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference CustomPreference = @"CustomPreference"; + + /// No preference + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference NoPreference = @"NoPreference"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Preference + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Preference(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Preference + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Preference (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Preference && Equals((Preference)obj); + } + + /// Returns hashCode for enum Preference + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Preference(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Preference + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Preference + /// the value to convert to an instance of . + + public static implicit operator Preference(string value) + { + return new Preference(value); + } + + /// Implicit operator to convert Preference to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference e) + { + return e._value; + } + + /// Overriding != operator for enum Preference + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Preference + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.Completer.cs new file mode 100644 index 000000000000..8d1963a8a39e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Protocol type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolTypeTypeConverter))] + public partial struct ProtocolType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TCP".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TCP'", "TCP", global::System.Management.Automation.CompletionResultType.ParameterValue, "TCP"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "TCPS".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'TCPS'", "TCPS", global::System.Management.Automation.CompletionResultType.ParameterValue, "TCPS"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.TypeConverter.cs new file mode 100644 index 000000000000..5c92e7cbc91d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Protocol type enum. + public partial class ProtocolTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ProtocolType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.cs new file mode 100644 index 000000000000..ff5a61709fb8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ProtocolType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Protocol type enum. + public partial struct ProtocolType : + System.IEquatable + { + /// TCP protocol + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType Tcp = @"TCP"; + + /// TCPS protocol + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType Tcps = @"TCPS"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ProtocolType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ProtocolType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ProtocolType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ProtocolType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ProtocolType && Equals((ProtocolType)obj); + } + + /// Returns hashCode for enum ProtocolType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ProtocolType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ProtocolType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ProtocolType + /// the value to convert to an instance of . + + public static implicit operator ProtocolType(string value) + { + return new ProtocolType(value); + } + + /// Implicit operator to convert ProtocolType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType e) + { + return e._value; + } + + /// Overriding != operator for enum ProtocolType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ProtocolType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ProtocolType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.Completer.cs new file mode 100644 index 000000000000..22aa554e3c96 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Refreshable model type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelTypeTypeConverter))] + public partial struct RefreshableModelType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Automatic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Automatic'", "Automatic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Automatic"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Manual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Manual'", "Manual", global::System.Management.Automation.CompletionResultType.ParameterValue, "Manual"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.TypeConverter.cs new file mode 100644 index 000000000000..57dfa0f6801a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Refreshable model type enum + public partial class RefreshableModelTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RefreshableModelType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.cs new file mode 100644 index 000000000000..13704ea0a7c4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableModelType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Refreshable model type enum + public partial struct RefreshableModelType : + System.IEquatable + { + /// Automatic refreshable model type + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType Automatic = @"Automatic"; + + /// Manual refreshable model type + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType Manual = @"Manual"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RefreshableModelType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RefreshableModelType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RefreshableModelType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RefreshableModelType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RefreshableModelType && Equals((RefreshableModelType)obj); + } + + /// Returns hashCode for enum RefreshableModelType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RefreshableModelType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RefreshableModelType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RefreshableModelType + /// the value to convert to an instance of . + + public static implicit operator RefreshableModelType(string value) + { + return new RefreshableModelType(value); + } + + /// Implicit operator to convert RefreshableModelType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType e) + { + return e._value; + } + + /// Overriding != operator for enum RefreshableModelType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RefreshableModelType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableModelType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.Completer.cs new file mode 100644 index 000000000000..04bc424e3133 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Refreshable status type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusTypeTypeConverter))] + public partial struct RefreshableStatusType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Refreshing".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Refreshing'", "Refreshing", global::System.Management.Automation.CompletionResultType.ParameterValue, "Refreshing"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NotRefreshing".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NotRefreshing'", "NotRefreshing", global::System.Management.Automation.CompletionResultType.ParameterValue, "NotRefreshing"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.TypeConverter.cs new file mode 100644 index 000000000000..590cde58d761 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Refreshable status type enum. + public partial class RefreshableStatusTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RefreshableStatusType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.cs new file mode 100644 index 000000000000..3bc0cb6ccf5a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RefreshableStatusType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Refreshable status type enum. + public partial struct RefreshableStatusType : + System.IEquatable + { + /// NotRefreshing status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType NotRefreshing = @"NotRefreshing"; + + /// Refreshing status + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType Refreshing = @"Refreshing"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RefreshableStatusType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RefreshableStatusType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RefreshableStatusType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RefreshableStatusType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RefreshableStatusType && Equals((RefreshableStatusType)obj); + } + + /// Returns hashCode for enum RefreshableStatusType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RefreshableStatusType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RefreshableStatusType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RefreshableStatusType + /// the value to convert to an instance of . + + public static implicit operator RefreshableStatusType(string value) + { + return new RefreshableStatusType(value); + } + + /// Implicit operator to convert RefreshableStatusType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType e) + { + return e._value; + } + + /// Overriding != operator for enum RefreshableStatusType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RefreshableStatusType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RefreshableStatusType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.Completer.cs new file mode 100644 index 000000000000..a2129982165d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Repeat cadence type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceTypeTypeConverter))] + public partial struct RepeatCadenceType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OneTime".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'OneTime'", "OneTime", global::System.Management.Automation.CompletionResultType.ParameterValue, "OneTime"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Weekly".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Weekly'", "Weekly", global::System.Management.Automation.CompletionResultType.ParameterValue, "Weekly"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Monthly".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Monthly'", "Monthly", global::System.Management.Automation.CompletionResultType.ParameterValue, "Monthly"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Yearly".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Yearly'", "Yearly", global::System.Management.Automation.CompletionResultType.ParameterValue, "Yearly"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.TypeConverter.cs new file mode 100644 index 000000000000..366fa6db82a4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Repeat cadence type enum + public partial class RepeatCadenceTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RepeatCadenceType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.cs new file mode 100644 index 000000000000..8c6ed34aa570 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RepeatCadenceType.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Repeat cadence type enum + public partial struct RepeatCadenceType : + System.IEquatable + { + /// Repeat monthly + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType Monthly = @"Monthly"; + + /// Repeat one time + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType OneTime = @"OneTime"; + + /// Repeat weekly + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType Weekly = @"Weekly"; + + /// Repeat yearly + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType Yearly = @"Yearly"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RepeatCadenceType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RepeatCadenceType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RepeatCadenceType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RepeatCadenceType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RepeatCadenceType && Equals((RepeatCadenceType)obj); + } + + /// Returns hashCode for enum RepeatCadenceType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RepeatCadenceType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RepeatCadenceType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RepeatCadenceType + /// the value to convert to an instance of . + + public static implicit operator RepeatCadenceType(string value) + { + return new RepeatCadenceType(value); + } + + /// Implicit operator to convert RepeatCadenceType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType e) + { + return e._value; + } + + /// Overriding != operator for enum RepeatCadenceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RepeatCadenceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.Completer.cs new file mode 100644 index 000000000000..0139f60fb68b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The provisioning state of a resource type. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningStateTypeConverter))] + public partial struct ResourceProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..fff8c5fa6108 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The provisioning state of a resource type. + public partial class ResourceProvisioningStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ResourceProvisioningState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.cs new file mode 100644 index 000000000000..f587f648d5cb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ResourceProvisioningState.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// The provisioning state of a resource type. + public partial struct ResourceProvisioningState : + System.IEquatable + { + /// Resource creation was canceled. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState Canceled = @"Canceled"; + + /// Resource creation failed. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState Failed = @"Failed"; + + /// Resource has been created. + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ResourceProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ResourceProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ResourceProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ResourceProvisioningState (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ResourceProvisioningState && Equals((ResourceProvisioningState)obj); + } + + /// Returns hashCode for enum ResourceProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ResourceProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ResourceProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ResourceProvisioningState + /// the value to convert to an instance of . + + public static implicit operator ResourceProvisioningState(string value) + { + return new ResourceProvisioningState(value); + } + + /// Implicit operator to convert ResourceProvisioningState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum ResourceProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ResourceProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ResourceProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.Completer.cs new file mode 100644 index 000000000000..3f36d92d4c56 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Role type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleTypeTypeConverter))] + public partial struct RoleType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Primary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Primary'", "Primary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Primary"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standby".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Standby'", "Standby", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standby"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DisabledStandby".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DisabledStandby'", "DisabledStandby", global::System.Management.Automation.CompletionResultType.ParameterValue, "DisabledStandby"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BackupCopy".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BackupCopy'", "BackupCopy", global::System.Management.Automation.CompletionResultType.ParameterValue, "BackupCopy"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "SnapshotStandby".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'SnapshotStandby'", "SnapshotStandby", global::System.Management.Automation.CompletionResultType.ParameterValue, "SnapshotStandby"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.TypeConverter.cs new file mode 100644 index 000000000000..db57ade5c704 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Role type enum. + public partial class RoleTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => RoleType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.cs new file mode 100644 index 000000000000..016e03abd121 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/RoleType.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Role type enum. + public partial struct RoleType : + System.IEquatable + { + /// BackupCopy role + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType BackupCopy = @"BackupCopy"; + + /// DisabledStandby role + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType DisabledStandby = @"DisabledStandby"; + + /// Primary role + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType Primary = @"Primary"; + + /// SnapshotStandby role + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType SnapshotStandby = @"SnapshotStandby"; + + /// Standby role + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType Standby = @"Standby"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to RoleType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new RoleType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type RoleType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type RoleType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is RoleType && Equals((RoleType)obj); + } + + /// Returns hashCode for enum RoleType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private RoleType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for RoleType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to RoleType + /// the value to convert to an instance of . + + public static implicit operator RoleType(string value) + { + return new RoleType(value); + } + + /// Implicit operator to convert RoleType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType e) + { + return e._value; + } + + /// Overriding != operator for enum RoleType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum RoleType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.Completer.cs new file mode 100644 index 000000000000..e82cf196481a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Session mode type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeTypeTypeConverter))] + public partial struct SessionModeType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Direct".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Direct'", "Direct", global::System.Management.Automation.CompletionResultType.ParameterValue, "Direct"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Redirect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Redirect'", "Redirect", global::System.Management.Automation.CompletionResultType.ParameterValue, "Redirect"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.TypeConverter.cs new file mode 100644 index 000000000000..680a71ac0878 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Session mode type enum. + public partial class SessionModeTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SessionModeType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.cs new file mode 100644 index 000000000000..0580b4d113a8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SessionModeType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Session mode type enum. + public partial struct SessionModeType : + System.IEquatable + { + /// Direct session mode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType Direct = @"Direct"; + + /// Redirect session mode + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType Redirect = @"Redirect"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SessionModeType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SessionModeType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SessionModeType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SessionModeType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SessionModeType && Equals((SessionModeType)obj); + } + + /// Returns hashCode for enum SessionModeType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SessionModeType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SessionModeType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SessionModeType + /// the value to convert to an instance of . + + public static implicit operator SessionModeType(string value) + { + return new SessionModeType(value); + } + + /// Implicit operator to convert SessionModeType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType e) + { + return e._value; + } + + /// Overriding != operator for enum SessionModeType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SessionModeType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SessionModeType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.Completer.cs new file mode 100644 index 000000000000..f8d775b23f1e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Allowed values for GI Minor Versions shapeFamily filter + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamilyTypeConverter))] + public partial struct ShapeFamily : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EXADATA".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EXADATA'", "EXADATA", global::System.Management.Automation.CompletionResultType.ParameterValue, "EXADATA"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EXADB_XS".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EXADB_XS'", "EXADB_XS", global::System.Management.Automation.CompletionResultType.ParameterValue, "EXADB_XS"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.TypeConverter.cs new file mode 100644 index 000000000000..051deda935fe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Allowed values for GI Minor Versions shapeFamily filter + public partial class ShapeFamilyTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ShapeFamily.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.cs new file mode 100644 index 000000000000..e12a6c53f74b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ShapeFamily.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Allowed values for GI Minor Versions shapeFamily filter + public partial struct ShapeFamily : + System.IEquatable + { + /// Family value for Exadata Shape + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily Exadata = @"EXADATA"; + + /// Family value for Exadb XS Shape + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily ExadbXs = @"EXADB_XS"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ShapeFamily + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ShapeFamily(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ShapeFamily + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ShapeFamily (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ShapeFamily && Equals((ShapeFamily)obj); + } + + /// Returns hashCode for enum ShapeFamily + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ShapeFamily(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ShapeFamily + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ShapeFamily + /// the value to convert to an instance of . + + public static implicit operator ShapeFamily(string value) + { + return new ShapeFamily(value); + } + + /// Implicit operator to convert ShapeFamily to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily e) + { + return e._value; + } + + /// Overriding != operator for enum ShapeFamily + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ShapeFamily + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.Completer.cs new file mode 100644 index 000000000000..a143b2c16b9c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.Completer.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Source type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceTypeTypeConverter))] + public partial struct SourceType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "None".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'None'", "None", global::System.Management.Automation.CompletionResultType.ParameterValue, "None"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Database".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Database'", "Database", global::System.Management.Automation.CompletionResultType.ParameterValue, "Database"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BackupFromId".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BackupFromId'", "BackupFromId", global::System.Management.Automation.CompletionResultType.ParameterValue, "BackupFromId"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "BackupFromTimestamp".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'BackupFromTimestamp'", "BackupFromTimestamp", global::System.Management.Automation.CompletionResultType.ParameterValue, "BackupFromTimestamp"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CloneToRefreshable".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CloneToRefreshable'", "CloneToRefreshable", global::System.Management.Automation.CompletionResultType.ParameterValue, "CloneToRefreshable"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CrossRegionDataguard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CrossRegionDataguard'", "CrossRegionDataguard", global::System.Management.Automation.CompletionResultType.ParameterValue, "CrossRegionDataguard"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CrossRegionDisasterRecovery".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CrossRegionDisasterRecovery'", "CrossRegionDisasterRecovery", global::System.Management.Automation.CompletionResultType.ParameterValue, "CrossRegionDisasterRecovery"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.TypeConverter.cs new file mode 100644 index 000000000000..bee85b4b8e14 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Source type enum. + public partial class SourceTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SourceType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.cs new file mode 100644 index 000000000000..0a8f43b3d31c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SourceType.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Source type enum. + public partial struct SourceType : + System.IEquatable + { + /// Backup from ID source + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType BackupFromId = @"BackupFromId"; + + /// Backup from timestamp source + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType BackupFromTimestamp = @"BackupFromTimestamp"; + + /// Clone to refreshable source + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType CloneToRefreshable = @"CloneToRefreshable"; + + /// Cross region dataguard source + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType CrossRegionDataguard = @"CrossRegionDataguard"; + + /// cross region disaster recovery source + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType CrossRegionDisasterRecovery = @"CrossRegionDisasterRecovery"; + + /// Database source + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType Database = @"Database"; + + /// None source + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType None = @"None"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SourceType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SourceType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SourceType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SourceType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SourceType && Equals((SourceType)obj); + } + + /// Returns hashCode for enum SourceType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SourceType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SourceType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SourceType + /// the value to convert to an instance of . + + public static implicit operator SourceType(string value) + { + return new SourceType(value); + } + + /// Implicit operator to convert SourceType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType e) + { + return e._value; + } + + /// Overriding != operator for enum SourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SourceType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SourceType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.Completer.cs new file mode 100644 index 000000000000..3d908daecc2e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Syntax format type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatTypeTypeConverter))] + public partial struct SyntaxFormatType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Long".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Long'", "Long", global::System.Management.Automation.CompletionResultType.ParameterValue, "Long"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Ezconnect".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Ezconnect'", "Ezconnect", global::System.Management.Automation.CompletionResultType.ParameterValue, "Ezconnect"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Ezconnectplus".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Ezconnectplus'", "Ezconnectplus", global::System.Management.Automation.CompletionResultType.ParameterValue, "Ezconnectplus"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.TypeConverter.cs new file mode 100644 index 000000000000..bd4cc6ba2780 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Syntax format type enum. + public partial class SyntaxFormatTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SyntaxFormatType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.cs new file mode 100644 index 000000000000..c972184b7d30 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SyntaxFormatType.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Syntax format type enum. + public partial struct SyntaxFormatType : + System.IEquatable + { + /// Ezconnect format + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType Ezconnect = @"Ezconnect"; + + /// Ezconnectplus format + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType Ezconnectplus = @"Ezconnectplus"; + + /// Long format + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType Long = @"Long"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SyntaxFormatType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SyntaxFormatType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SyntaxFormatType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SyntaxFormatType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SyntaxFormatType && Equals((SyntaxFormatType)obj); + } + + /// Returns hashCode for enum SyntaxFormatType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SyntaxFormatType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SyntaxFormatType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SyntaxFormatType + /// the value to convert to an instance of . + + public static implicit operator SyntaxFormatType(string value) + { + return new SyntaxFormatType(value); + } + + /// Implicit operator to convert SyntaxFormatType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType e) + { + return e._value; + } + + /// Overriding != operator for enum SyntaxFormatType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SyntaxFormatType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SyntaxFormatType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.Completer.cs new file mode 100644 index 000000000000..d435a0259f56 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Allowed values for System Shapes + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapesTypeConverter))] + public partial struct SystemShapes : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Exadata.X9M".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Exadata.X9M'", "Exadata.X9M", global::System.Management.Automation.CompletionResultType.ParameterValue, "Exadata.X9M"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Exadata.X11M".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Exadata.X11M'", "Exadata.X11M", global::System.Management.Automation.CompletionResultType.ParameterValue, "Exadata.X11M"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ExaDbXS".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ExaDbXS'", "ExaDbXS", global::System.Management.Automation.CompletionResultType.ParameterValue, "ExaDbXS"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.TypeConverter.cs new file mode 100644 index 000000000000..f40e582ee04d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Allowed values for System Shapes + public partial class SystemShapesTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => SystemShapes.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.cs new file mode 100644 index 000000000000..8263005c62c5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/SystemShapes.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Allowed values for System Shapes + public partial struct SystemShapes : + System.IEquatable + { + /// Exadata DB on Exascale Infrastructure shape + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes ExaDbXs = @"ExaDbXS"; + + /// Exadata X11M shape + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes ExadataX11M = @"Exadata.X11M"; + + /// Exadata X9M shape + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes ExadataX9M = @"Exadata.X9M"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SystemShapes + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SystemShapes(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SystemShapes + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SystemShapes (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SystemShapes && Equals((SystemShapes)obj); + } + + /// Returns hashCode for enum SystemShapes + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SystemShapes(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SystemShapes + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SystemShapes + /// the value to convert to an instance of . + + public static implicit operator SystemShapes(string value) + { + return new SystemShapes(value); + } + + /// Implicit operator to convert SystemShapes to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes e) + { + return e._value; + } + + /// Overriding != operator for enum SystemShapes + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SystemShapes + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.Completer.cs new file mode 100644 index 000000000000..5a3363937c45 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// TLS authentication type enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationTypeTypeConverter))] + public partial struct TlsAuthenticationType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Server".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Server'", "Server", global::System.Management.Automation.CompletionResultType.ParameterValue, "Server"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Mutual".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Mutual'", "Mutual", global::System.Management.Automation.CompletionResultType.ParameterValue, "Mutual"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.TypeConverter.cs new file mode 100644 index 000000000000..5f9962f76ee1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// TLS authentication type enum. + public partial class TlsAuthenticationTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => TlsAuthenticationType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.cs new file mode 100644 index 000000000000..adeb34a31a65 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/TlsAuthenticationType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// TLS authentication type enum. + public partial struct TlsAuthenticationType : + System.IEquatable + { + /// Mutual TLS + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType Mutual = @"Mutual"; + + /// Server authentication + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType Server = @"Server"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to TlsAuthenticationType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new TlsAuthenticationType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type TlsAuthenticationType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type TlsAuthenticationType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is TlsAuthenticationType && Equals((TlsAuthenticationType)obj); + } + + /// Returns hashCode for enum TlsAuthenticationType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private TlsAuthenticationType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for TlsAuthenticationType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to TlsAuthenticationType + /// the value to convert to an instance of . + + public static implicit operator TlsAuthenticationType(string value) + { + return new TlsAuthenticationType(value); + } + + /// Implicit operator to convert TlsAuthenticationType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType e) + { + return e._value; + } + + /// Overriding != operator for enum TlsAuthenticationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum TlsAuthenticationType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.TlsAuthenticationType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.Completer.cs new file mode 100644 index 000000000000..28b946c0a663 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Update action enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateActionTypeConverter))] + public partial struct UpdateAction : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RollingApply".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RollingApply'", "RollingApply", global::System.Management.Automation.CompletionResultType.ParameterValue, "RollingApply"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NonRollingApply".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NonRollingApply'", "NonRollingApply", global::System.Management.Automation.CompletionResultType.ParameterValue, "NonRollingApply"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "PreCheck".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'PreCheck'", "PreCheck", global::System.Management.Automation.CompletionResultType.ParameterValue, "PreCheck"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "RollBack".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'RollBack'", "RollBack", global::System.Management.Automation.CompletionResultType.ParameterValue, "RollBack"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.TypeConverter.cs new file mode 100644 index 000000000000..c7d0aeafc479 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Update action enum + public partial class UpdateActionTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => UpdateAction.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.cs new file mode 100644 index 000000000000..92f2919d0e73 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/UpdateAction.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Update action enum + public partial struct UpdateAction : + System.IEquatable + { + /// Non rolling apply action + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction NonRollingApply = @"NonRollingApply"; + + /// Pre-check action + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction PreCheck = @"PreCheck"; + + /// Rollback action + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction RollBack = @"RollBack"; + + /// Rolling apply action + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction RollingApply = @"RollingApply"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to UpdateAction + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new UpdateAction(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type UpdateAction + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type UpdateAction (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is UpdateAction && Equals((UpdateAction)obj); + } + + /// Returns hashCode for enum UpdateAction + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for UpdateAction + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private UpdateAction(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to UpdateAction + /// the value to convert to an instance of . + + public static implicit operator UpdateAction(string value) + { + return new UpdateAction(value); + } + + /// Implicit operator to convert UpdateAction to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction e) + { + return e._value; + } + + /// Overriding != operator for enum UpdateAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum UpdateAction + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.UpdateAction e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.Completer.cs new file mode 100644 index 000000000000..0e91f14a3cb0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// validation status + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatusTypeConverter))] + public partial struct ValidationStatus : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.TypeConverter.cs new file mode 100644 index 000000000000..30faa836d975 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// validation status + public partial class ValidationStatusTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ValidationStatus.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.cs new file mode 100644 index 000000000000..eb66d81de029 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ValidationStatus.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// validation status + public partial struct ValidationStatus : + System.IEquatable + { + /// Validation failed + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus Failed = @"Failed"; + + /// Validation succeeded + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus Succeeded = @"Succeeded"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ValidationStatus + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ValidationStatus(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ValidationStatus + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ValidationStatus (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ValidationStatus && Equals((ValidationStatus)obj); + } + + /// Returns hashCode for enum ValidationStatus + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ValidationStatus + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ValidationStatus(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to ValidationStatus + /// the value to convert to an instance of . + + public static implicit operator ValidationStatus(string value) + { + return new ValidationStatus(value); + } + + /// Implicit operator to convert ValidationStatus to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus e) + { + return e._value; + } + + /// Overriding != operator for enum ValidationStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ValidationStatus + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ValidationStatus e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.Completer.cs new file mode 100644 index 000000000000..67bba87bb16b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.Completer.cs @@ -0,0 +1,51 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// VirtualNetworkAddressLifecycleState enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleStateTypeConverter))] + public partial struct VirtualNetworkAddressLifecycleState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Provisioning".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Provisioning'", "Provisioning", global::System.Management.Automation.CompletionResultType.ParameterValue, "Provisioning"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Available".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Available'", "Available", global::System.Management.Automation.CompletionResultType.ParameterValue, "Available"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminating'", "Terminating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminating"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Terminated".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Terminated'", "Terminated", global::System.Management.Automation.CompletionResultType.ParameterValue, "Terminated"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.TypeConverter.cs new file mode 100644 index 000000000000..fd1995f101b7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// VirtualNetworkAddressLifecycleState enum + public partial class VirtualNetworkAddressLifecycleStateTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => VirtualNetworkAddressLifecycleState.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.cs new file mode 100644 index 000000000000..74ea215d2df0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/VirtualNetworkAddressLifecycleState.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// VirtualNetworkAddressLifecycleState enum + public partial struct VirtualNetworkAddressLifecycleState : + System.IEquatable + { + /// Indicates that resource in Available state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState Available = @"Available"; + + /// Indicates that resource in Failed state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState Failed = @"Failed"; + + /// Indicates that resource in Provisioning state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState Provisioning = @"Provisioning"; + + /// Indicates that resource in Terminated state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState Terminated = @"Terminated"; + + /// Indicates that resource in Terminating state + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState Terminating = @"Terminating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to VirtualNetworkAddressLifecycleState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new VirtualNetworkAddressLifecycleState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type VirtualNetworkAddressLifecycleState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type VirtualNetworkAddressLifecycleState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is VirtualNetworkAddressLifecycleState && Equals((VirtualNetworkAddressLifecycleState)obj); + } + + /// Returns hashCode for enum VirtualNetworkAddressLifecycleState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for VirtualNetworkAddressLifecycleState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private VirtualNetworkAddressLifecycleState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to VirtualNetworkAddressLifecycleState + /// the value to convert to an instance of . + + public static implicit operator VirtualNetworkAddressLifecycleState(string value) + { + return new VirtualNetworkAddressLifecycleState(value); + } + + /// Implicit operator to convert VirtualNetworkAddressLifecycleState to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState e) + { + return e._value; + } + + /// Overriding != operator for enum VirtualNetworkAddressLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum VirtualNetworkAddressLifecycleState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.VirtualNetworkAddressLifecycleState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.Completer.cs new file mode 100644 index 000000000000..56e36c184de1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// WorkloadType enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadTypeTypeConverter))] + public partial struct WorkloadType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OLTP".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'OLTP'", "OLTP", global::System.Management.Automation.CompletionResultType.ParameterValue, "OLTP"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "DW".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'DW'", "DW", global::System.Management.Automation.CompletionResultType.ParameterValue, "DW"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "AJD".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'AJD'", "AJD", global::System.Management.Automation.CompletionResultType.ParameterValue, "AJD"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "APEX".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'APEX'", "APEX", global::System.Management.Automation.CompletionResultType.ParameterValue, "APEX"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.TypeConverter.cs new file mode 100644 index 000000000000..51661f394e14 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// WorkloadType enum + public partial class WorkloadTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => WorkloadType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.cs new file mode 100644 index 000000000000..f0d2b06ea75f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/WorkloadType.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// WorkloadType enum + public partial struct WorkloadType : + System.IEquatable + { + /// AJD - indicates an Autonomous JSON Database + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType Ajd = @"AJD"; + + /// + /// APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType Apex = @"APEX"; + + /// DW - indicates an Autonomous Data Warehouse database + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType Dw = @"DW"; + + /// OLTP - indicates an Autonomous Transaction Processing database + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType Oltp = @"OLTP"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WorkloadType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WorkloadType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WorkloadType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WorkloadType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WorkloadType && Equals((WorkloadType)obj); + } + + /// Returns hashCode for enum WorkloadType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WorkloadType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WorkloadType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WorkloadType + /// the value to convert to an instance of . + + public static implicit operator WorkloadType(string value) + { + return new WorkloadType(value); + } + + /// Implicit operator to convert WorkloadType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType e) + { + return e._value; + } + + /// Overriding != operator for enum WorkloadType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WorkloadType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.Completer.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.Completer.cs new file mode 100644 index 000000000000..66c9e782aed0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Zone type enum + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneTypeTypeConverter))] + public partial struct ZoneType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Primary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Primary'", "Primary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Primary"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Secondary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Secondary'", "Secondary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Secondary"); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.TypeConverter.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.TypeConverter.cs new file mode 100644 index 000000000000..ecd0b7e8e341 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Zone type enum + public partial class ZoneTypeTypeConverter : + global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => true; + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ZoneType.CreateFrom(sourceValue); + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.cs b/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.cs new file mode 100644 index 000000000000..f4790b935479 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/api/Support/ZoneType.cs @@ -0,0 +1,100 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support +{ + + /// Zone type enum + public partial struct ZoneType : + System.IEquatable + { + /// Primary zone + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType Primary = @"Primary"; + + /// Secondary zone + public static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType Secondary = @"Secondary"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ZoneType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ZoneType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ZoneType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ZoneType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ZoneType && Equals((ZoneType)obj); + } + + /// Returns hashCode for enum ZoneType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ZoneType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ZoneType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to ZoneType + /// the value to convert to an instance of . + + public static implicit operator ZoneType(string value) + { + return new ZoneType(value); + } + + /// Implicit operator to convert ZoneType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType e) + { + return e._value; + } + + /// Overriding != operator for enum ZoneType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ZoneType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType e1, Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ZoneType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add.cs new file mode 100644 index 000000000000..f7f1938b7089 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform add storage capacity on exadata infra + /// + /// [OpenAPI] AddStorageCapacity=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform add storage capacity on exadata infra")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudexadatainfrastructurename; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudexadatainfrastructurename { get => this._cloudexadatainfrastructurename; set => this._cloudexadatainfrastructurename = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_Add(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudexadatainfrastructurename = this.Cloudexadatainfrastructurename; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresAddStorageCapacity' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresAddStorageCapacity(SubscriptionId, ResourceGroupName, Cloudexadatainfrastructurename, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudexadatainfrastructurename=Cloudexadatainfrastructurename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudexadatainfrastructurename=Cloudexadatainfrastructurename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudexadatainfrastructurename=Cloudexadatainfrastructurename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity.cs new file mode 100644 index 000000000000..84e625b4ae69 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform add storage capacity on exadata infra + /// + /// [OpenAPI] AddStorageCapacity=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform add storage capacity on exadata infra")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/addStorageCapacity", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity_AddViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresAddStorageCapacity' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudExadataInfrastructuresAddStorageCapacityViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudExadataInfrastructuresAddStorageCapacity(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add.cs new file mode 100644 index 000000000000..55c55d558d0c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add.cs @@ -0,0 +1,517 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_Add", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body; + + /// Add/Remove (Virtual Machine) DbNode model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Add/Remove (Virtual Machine) DbNode model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Add/Remove (Virtual Machine) DbNode model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// a duplicate instance of AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerCloudVMClusterVM_Add(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersAddVms(SubscriptionId, ResourceGroupName, Cloudvmclustername, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded.cs new file mode 100644 index 000000000000..af4ebcc7eeee --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer ?? null /* arrayOf */; set => _body.DbServer = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersAddVms(SubscriptionId, ResourceGroupName, Cloudvmclustername, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity.cs new file mode 100644 index 000000000000..07b58ab28755 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body; + + /// Add/Remove (Virtual Machine) DbNode model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Add/Remove (Virtual Machine) DbNode model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Add/Remove (Virtual Machine) DbNode model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersAddVmsViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersAddVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded.cs new file mode 100644 index 000000000000..5f58a92678cd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add VMs to the VM Cluster + /// + /// [OpenAPI] AddVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add VMs to the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/addVms", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer ?? null /* arrayOf */; set => _body.DbServer = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerCloudVMClusterVM_AddViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersAddVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersAddVmsViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersAddVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add.cs new file mode 100644 index 000000000000..a36492a57963 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add.cs @@ -0,0 +1,454 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add Azure Subscriptions + /// + /// [OpenAPI] AddAzureSubscriptions=>POST:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add Azure Subscriptions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions _body; + + /// Azure Subscriptions model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscriptions model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscriptions model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_Add(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsAddAzureSubscriptions' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsAddAzureSubscriptions(SubscriptionId, Body, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded.cs new file mode 100644 index 000000000000..38327b4f74ec --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded.cs @@ -0,0 +1,456 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add Azure Subscriptions + /// + /// [OpenAPI] AddAzureSubscriptions=>POST:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add Azure Subscriptions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Azure Subscriptions model + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AzureSubscriptions(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Azure Subscription Ids to be updated + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription Ids to be updated")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription Ids to be updated", + SerializedName = @"azureSubscriptionIds", + PossibleTypes = new [] { typeof(string) })] + public string[] AzureSubscriptionId { get => _body.AzureSubscriptionId ?? null /* arrayOf */; set => _body.AzureSubscriptionId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsAddAzureSubscriptions' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsAddAzureSubscriptions(SubscriptionId, _body, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity.cs new file mode 100644 index 000000000000..eca7fa948c0c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity.cs @@ -0,0 +1,455 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add Azure Subscriptions + /// + /// [OpenAPI] AddAzureSubscriptions=>POST:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add Azure Subscriptions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions _body; + + /// Azure Subscriptions model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscriptions model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscriptions model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsAddAzureSubscriptions' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OracleSubscriptionsAddAzureSubscriptionsViaIdentity(InputObject.Id, Body, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OracleSubscriptionsAddAzureSubscriptions(InputObject.SubscriptionId ?? null, Body, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded.cs new file mode 100644 index 000000000000..6c5d9a078091 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Add Azure Subscriptions + /// + /// [OpenAPI] AddAzureSubscriptions=>POST:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Add, @"AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Add Azure Subscriptions")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/addAzureSubscriptions", ApiVersion = "2025-03-01")] + public partial class AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Azure Subscriptions model + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAzureSubscriptions _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AzureSubscriptions(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Azure Subscription Ids to be updated + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Azure Subscription Ids to be updated")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Azure Subscription Ids to be updated", + SerializedName = @"azureSubscriptionIds", + PossibleTypes = new [] { typeof(string) })] + public string[] AzureSubscriptionId { get => _body.AzureSubscriptionId ?? null /* arrayOf */; set => _body.AzureSubscriptionId = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// Intializes a new instance of the cmdlet class. + /// + public AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded() + { + + } + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded Clone() + { + var clone = new AddAzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription_AddViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsAddAzureSubscriptions' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OracleSubscriptionsAddAzureSubscriptionsViaIdentity(InputObject.Id, _body, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OracleSubscriptionsAddAzureSubscriptions(InputObject.SubscriptionId ?? null, _body, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List.cs new file mode 100644 index 000000000000..322c815c24ba --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List.cs @@ -0,0 +1,460 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List AutonomousDatabaseBackup resources by AutonomousDatabase + /// + /// [OpenAPI] ListByParent=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List AutonomousDatabaseBackup resources by AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsListByParent(SubscriptionId, ResourceGroupName, Autonomousdatabasename, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsListByParent_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List.cs new file mode 100644 index 000000000000..0cd6d6bc6e92 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List AutonomousDatabaseCharacterSet resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseCharacterSetsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSetListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseCharacterSetsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List.cs new file mode 100644 index 000000000000..1197ecab0d4a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List.cs @@ -0,0 +1,448 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// + /// List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource + /// + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List AutonomousDatabaseNationalCharacterSet resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseNationalCharacterSetsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSetListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseNationalCharacterSetsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List.cs new file mode 100644 index 000000000000..91027213c090 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List AutonomousDbVersion resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List AutonomousDbVersion resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerAutonomouDatabaseVersion_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseVersionsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseVersionsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabase_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabase_List.cs new file mode 100644 index 000000000000..cd6cb1354e0a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabase_List.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List AutonomousDatabase resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomouDatabase_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List AutonomousDatabase resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/autonomousDatabases", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomouDatabase_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomouDatabase_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabase_List1.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabase_List1.cs new file mode 100644 index 000000000000..c074b3115ee5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomouDatabase_List1.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List AutonomousDatabase resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomouDatabase_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List AutonomousDatabase resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomouDatabase_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomouDatabase_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get.cs new file mode 100644 index 000000000000..adbe6e5bcab4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabaseBackup + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsGet(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity.cs new file mode 100644 index 000000000000..c6b8655dbb46 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabaseBackup + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseBackupsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbbackupid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbbackupid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseBackupsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, InputObject.Adbbackupid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get.cs new file mode 100644 index 000000000000..5885424d8358 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabaseCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabaseCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _adbscharsetname; + + /// AutonomousDatabaseCharacterSet name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseCharacterSet name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseCharacterSet name", + SerializedName = @"adbscharsetname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Adbscharsetname { get => this._adbscharsetname; set => this._adbscharsetname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseCharacterSetsGet(SubscriptionId, Location, Adbscharsetname, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Adbscharsetname=Adbscharsetname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Adbscharsetname=Adbscharsetname }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Adbscharsetname=Adbscharsetname }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity.cs new file mode 100644 index 000000000000..cb4fbabbf119 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabaseCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabaseCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseCharacterSets/{adbscharsetname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseCharacterSetsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbscharsetname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbscharsetname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseCharacterSetsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Adbscharsetname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseCharacterSet + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get.cs new file mode 100644 index 000000000000..c23a20a6f0fd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabaseNationalCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _adbsncharsetname; + + /// AutonomousDatabaseNationalCharacterSets name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseNationalCharacterSets name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseNationalCharacterSets name", + SerializedName = @"adbsncharsetname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Adbsncharsetname { get => this._adbsncharsetname; set => this._adbsncharsetname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseNationalCharacterSetsGet(SubscriptionId, Location, Adbsncharsetname, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Adbsncharsetname=Adbsncharsetname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Adbsncharsetname=Adbsncharsetname }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Adbsncharsetname=Adbsncharsetname }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity.cs new file mode 100644 index 000000000000..0b5e8f54e396 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabaseNationalCharacterSet + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabaseNationalCharacterSet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDatabaseNationalCharacterSets/{adbsncharsetname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseNationalCharacterSetsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbsncharsetname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbsncharsetname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseNationalCharacterSetsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Adbsncharsetname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseNationalCharacterSet + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get.cs new file mode 100644 index 000000000000..a2844a05a60f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDbVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDbVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _autonomousdbversionsname; + + /// AutonomousDbVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDbVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDbVersion name", + SerializedName = @"autonomousdbversionsname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdbversionsname { get => this._autonomousdbversionsname; set => this._autonomousdbversionsname = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseVersionsGet(SubscriptionId, Location, Autonomousdbversionsname, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Autonomousdbversionsname=Autonomousdbversionsname}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Autonomousdbversionsname=Autonomousdbversionsname }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Autonomousdbversionsname=Autonomousdbversionsname }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity.cs new file mode 100644 index 000000000000..2e85850228b0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDbVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDbVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/autonomousDbVersions/{autonomousdbversionsname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabaseVersion_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseVersionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdbversionsname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdbversionsname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseVersionsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Autonomousdbversionsname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDbVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabase_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabase_Get.cs new file mode 100644 index 000000000000..2b7bbdc50c37 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabase_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabase + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabase_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabase_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabase_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity.cs new file mode 100644 index 000000000000..2839e0258894 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a AutonomousDatabase + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerAutonomousDatabase_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get.cs new file mode 100644 index 000000000000..b04c35b06bbe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get.cs @@ -0,0 +1,439 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a CloudExadataInfrastructure + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity.cs new file mode 100644 index 000000000000..bfd81de62532 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a CloudExadataInfrastructure + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudExadataInfrastructuresGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudExadataInfrastructuresGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List.cs new file mode 100644 index 000000000000..30c32e8a0202 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List CloudExadataInfrastructure resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List CloudExadataInfrastructure resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudExadataInfrastructures", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1.cs new file mode 100644 index 000000000000..3b1c00575d23 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List CloudExadataInfrastructure resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List CloudExadataInfrastructure resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerCloudExadataInfrastructure_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List.cs new file mode 100644 index 000000000000..48ab21242484 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List.cs @@ -0,0 +1,455 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List Private IP Addresses by the provided filter + /// + /// [OpenAPI] ListPrivateIpAddresses=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List Private IP Addresses by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter _body; + + /// Private Ip Addresses filter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Private Ip Addresses filter", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Private Ip Addresses filter", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties[] + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersListPrivateIPAddresses' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListPrivateIPAddresses(SubscriptionId, ResourceGroupName, Cloudvmclustername, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties[] + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // array / / + WriteObject(await response, true); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded.cs new file mode 100644 index 000000000000..7edb1c651701 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded.cs @@ -0,0 +1,467 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List Private IP Addresses by the provided filter + /// + /// [OpenAPI] ListPrivateIpAddresses=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List Private IP Addresses by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/listPrivateIpAddresses", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Private Ip Addresses filter + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressesFilter _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PrivateIPAddressesFilter(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Subnet OCID + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subnet OCID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Subnet OCID", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + public string SubnetId { get => _body.SubnetId ?? null; set => _body.SubnetId = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// VCN OCID + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "VCN OCID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"VCN OCID", + SerializedName = @"vnicId", + PossibleTypes = new [] { typeof(string) })] + public string VnicId { get => _body.VnicId ?? null; set => _body.VnicId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties[] + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress_ListExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersListPrivateIPAddresses' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListPrivateIPAddresses(SubscriptionId, ResourceGroupName, Cloudvmclustername, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPrivateIPAddressProperties[] + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // array / / + WriteObject(await response, true); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_Get.cs new file mode 100644 index 000000000000..d1fcb71ac227 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a CloudVmCluster + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudVMCluster_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudVMCluster_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerCloudVMCluster_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity.cs new file mode 100644 index 000000000000..6aec91b04db7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a CloudVmCluster + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerCloudVMCluster_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_List.cs new file mode 100644 index 000000000000..778592201eae --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_List.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List CloudVmCluster resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudVMCluster_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List CloudVmCluster resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/cloudVmClusters", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudVMCluster_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerCloudVMCluster_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_List1.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_List1.cs new file mode 100644 index 000000000000..d0875418529b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerCloudVMCluster_List1.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List CloudVmCluster resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerCloudVMCluster_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List CloudVmCluster resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerCloudVMCluster_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerCloudVMCluster_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_Get.cs new file mode 100644 index 000000000000..8b5909d68f88 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_Get.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DbNode + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbNode_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DbNode")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbNode_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbnodeocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbNode_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesGet(SubscriptionId, ResourceGroupName, Cloudvmclustername, Ocid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Ocid=Ocid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Ocid=Ocid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_GetViaIdentity.cs new file mode 100644 index 000000000000..5d45f5010839 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_GetViaIdentity.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DbNode + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbNode_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DbNode")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbNode_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbNode_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbNodesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbnodeocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbnodeocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbNodesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, InputObject.Dbnodeocid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_List.cs new file mode 100644 index 000000000000..5c78437f1a34 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbNode_List.cs @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List DbNode resources by CloudVmCluster + /// + /// [OpenAPI] ListByParent=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbNode_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List DbNode resources by CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbNode_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbNode_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesListByParent(SubscriptionId, ResourceGroupName, Cloudvmclustername, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesListByParent_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_Get.cs new file mode 100644 index 000000000000..57f30b49aa4d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_Get.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DbServer + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbServer_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DbServer")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbServer_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudexadatainfrastructurename; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudexadatainfrastructurename { get => this._cloudexadatainfrastructurename; set => this._cloudexadatainfrastructurename = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DbServer OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbServer OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbServer OCID.", + SerializedName = @"dbserverocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbserverocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbServer_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbServersGet(SubscriptionId, ResourceGroupName, Cloudexadatainfrastructurename, Ocid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudexadatainfrastructurename=Cloudexadatainfrastructurename,Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudexadatainfrastructurename=Cloudexadatainfrastructurename, Ocid=Ocid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudexadatainfrastructurename=Cloudexadatainfrastructurename, Ocid=Ocid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_GetViaIdentity.cs new file mode 100644 index 000000000000..aab4947109fe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_GetViaIdentity.cs @@ -0,0 +1,420 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DbServer + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbServer_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DbServer")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers/{dbserverocid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbServer_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbServer_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbServersGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbserverocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbserverocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbServersGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, InputObject.Dbserverocid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_List.cs new file mode 100644 index 000000000000..47748a2c3b6c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbServer_List.cs @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List DbServer resources by CloudExadataInfrastructure + /// + /// [OpenAPI] ListByParent=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbServer_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServer))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List DbServer resources by CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}/dbServers", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbServer_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudexadatainfrastructurename; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudexadatainfrastructurename { get => this._cloudexadatainfrastructurename; set => this._cloudexadatainfrastructurename = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbServer_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbServersListByParent(SubscriptionId, ResourceGroupName, Cloudexadatainfrastructurename, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudexadatainfrastructurename=Cloudexadatainfrastructurename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudexadatainfrastructurename=Cloudexadatainfrastructurename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudexadatainfrastructurename=Cloudexadatainfrastructurename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbServerListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbServersListByParent_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_Get.cs new file mode 100644 index 000000000000..0aac72eb3885 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DbSystemShape + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbSystemShape_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DbSystemShape")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbSystemShape_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// DbSystemShape name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbSystemShape name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbSystemShape name", + SerializedName = @"dbsystemshapename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dbsystemshapename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbSystemShape_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbSystemShapesGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity.cs new file mode 100644 index 000000000000..1e15bc28cd90 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DbSystemShape + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DbSystemShape")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes/{dbsystemshapename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerDbSystemShape_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbSystemShapesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbsystemshapename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbsystemshapename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbSystemShapesGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Dbsystemshapename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_List.cs new file mode 100644 index 000000000000..f5c9fc939549 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDbSystemShape_List.cs @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List DbSystemShape resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDbSystemShape_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShape))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List DbSystemShape resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dbSystemShapes", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDbSystemShape_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _zone; + + /// Filters the result for the given Azure Availability Zone + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filters the result for the given Azure Availability Zone")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filters the result for the given Azure Availability Zone", + SerializedName = @"zone", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Query)] + public string Zone { get => this._zone; set => this._zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDbSystemShape_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbSystemShapesListByLocation(SubscriptionId, Location, this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbSystemShapeListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbSystemShapesListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_Get.cs new file mode 100644 index 000000000000..71f27cf5f701 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DnsPrivateView + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDnsPrivateView_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DnsPrivateView")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDnsPrivateView_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _ocid; + + /// DnsPrivateView OCID + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DnsPrivateView OCID")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DnsPrivateView OCID", + SerializedName = @"dnsprivateviewocid", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dnsprivateviewocid")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Ocid { get => this._ocid; set => this._ocid = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDnsPrivateView_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateViewsGet(SubscriptionId, Location, Ocid, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Ocid=Ocid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Ocid=Ocid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Ocid=Ocid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity.cs new file mode 100644 index 000000000000..d888c78bdb36 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DnsPrivateView + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DnsPrivateView")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews/{dnsprivateviewocid}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerDnsPrivateView_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DnsPrivateViewsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dnsprivateviewocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dnsprivateviewocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DnsPrivateViewsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Dnsprivateviewocid ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_List.cs new file mode 100644 index 000000000000..5dc31057530a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateView_List.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List DnsPrivateView resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDnsPrivateView_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateView))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List DnsPrivateView resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateViews", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDnsPrivateView_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDnsPrivateView_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateViewsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateViewListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateViewsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_Get.cs new file mode 100644 index 000000000000..05d9b7be58a4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DnsPrivateZone + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDnsPrivateZone_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DnsPrivateZone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDnsPrivateZone_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// DnsPrivateZone name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DnsPrivateZone name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DnsPrivateZone name", + SerializedName = @"dnsprivatezonename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Dnsprivatezonename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDnsPrivateZone_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateZonesGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity.cs new file mode 100644 index 000000000000..e9bab0560603 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a DnsPrivateZone + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a DnsPrivateZone")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones/{dnsprivatezonename}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerDnsPrivateZone_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DnsPrivateZonesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dnsprivatezonename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dnsprivatezonename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DnsPrivateZonesGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Dnsprivatezonename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_List.cs new file mode 100644 index 000000000000..74c8a5220166 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerDnsPrivateZone_List.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List DnsPrivateZone resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerDnsPrivateZone_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZone))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List DnsPrivateZone resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/dnsPrivateZones", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerDnsPrivateZone_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerDnsPrivateZone_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateZonesListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDnsPrivateZoneListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DnsPrivateZonesListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_Get.cs new file mode 100644 index 000000000000..cc9df7eb2d29 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a ExadbVmCluster + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExadbVMCluster_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExadbVMCluster_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExadbVMClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExadbVMCluster_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity.cs new file mode 100644 index 000000000000..ea109bc46f50 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a ExadbVmCluster + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerExadbVMCluster_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExadbVMClustersGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExadbVMClustersGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_List.cs new file mode 100644 index 000000000000..4149eaac051f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_List.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List ExadbVmCluster resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExadbVMCluster_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List ExadbVmCluster resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/exadbVmClusters", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExadbVMCluster_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExadbVMCluster_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_List1.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_List1.cs new file mode 100644 index 000000000000..067027e8e099 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExadbVMCluster_List1.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List ExadbVmCluster resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExadbVMCluster_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List ExadbVmCluster resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExadbVMCluster_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExadbVMCluster_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_Get.cs new file mode 100644 index 000000000000..03b65c8ac155 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_Get.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a ExascaleDbNode + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExascaleDbNode_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a ExascaleDbNode")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExascaleDbNode_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _exadbVMClusterName; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExadbVMClusterName { get => this._exadbVMClusterName; set => this._exadbVMClusterName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExascaleDbNode + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExascaleDbNode")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExascaleDbNode", + SerializedName = @"exascaleDbNodeName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExascaleDbNodeName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExascaleDbNode_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbNodesGet(SubscriptionId, ResourceGroupName, ExadbVMClusterName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ExadbVMClusterName=ExadbVMClusterName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity.cs new file mode 100644 index 000000000000..cf4ebccd70ab --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a ExascaleDbNode + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a ExascaleDbNode")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerExascaleDbNode_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExascaleDbNodesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExascaleDbNodeName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExascaleDbNodeName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExascaleDbNodesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, InputObject.ExascaleDbNodeName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_List.cs new file mode 100644 index 000000000000..626daa33c739 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbNode_List.cs @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List ExascaleDbNode resources by ExadbVmCluster + /// + /// [OpenAPI] ListByParent=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExascaleDbNode_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List ExascaleDbNode resources by ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExascaleDbNode_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _exadbVMClusterName; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExadbVMClusterName { get => this._exadbVMClusterName; set => this._exadbVMClusterName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExascaleDbNode_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbNodesListByParent(SubscriptionId, ResourceGroupName, ExadbVMClusterName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ExadbVMClusterName=ExadbVMClusterName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbNodeListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbNodesListByParent_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_Get.cs new file mode 100644 index 000000000000..f9b8f5c08ebc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a ExascaleDbStorageVault + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a ExascaleDbStorageVault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExascaleDbStorageVault + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExascaleDbStorageVault")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExascaleDbStorageVault", + SerializedName = @"exascaleDbStorageVaultName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExascaleDbStorageVaultName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsGet(SubscriptionId, ResourceGroupName, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity.cs new file mode 100644 index 000000000000..5f206753d133 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a ExascaleDbStorageVault + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a ExascaleDbStorageVault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExascaleDbStorageVaultsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExascaleDbStorageVaultName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExascaleDbStorageVaultName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExascaleDbStorageVaultsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExascaleDbStorageVaultName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List.cs new file mode 100644 index 000000000000..8c4f6b619a47 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List ExascaleDbStorageVault resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List ExascaleDbStorageVault resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/exascaleDbStorageVaults", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List1.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List1.cs new file mode 100644 index 000000000000..d3ac4a674d36 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List1.cs @@ -0,0 +1,446 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List ExascaleDbStorageVault resources by resource group + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List ExascaleDbStorageVault resources by resource group")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerExascaleDbStorageVault_List1() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsListByResourceGroup(SubscriptionId, ResourceGroupName, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_Get.cs new file mode 100644 index 000000000000..268719bad580 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a FlexComponent + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerFlexComponent_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a FlexComponent")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerFlexComponent_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the FlexComponent + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the FlexComponent")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the FlexComponent", + SerializedName = @"flexComponentName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("FlexComponentName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerFlexComponent_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlexComponentsGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity.cs new file mode 100644 index 000000000000..a97bdc978676 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a FlexComponent + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a FlexComponent")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents/{flexComponentName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerFlexComponent_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.FlexComponentsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.FlexComponentName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.FlexComponentName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.FlexComponentsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.FlexComponentName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_List.cs new file mode 100644 index 000000000000..0a4dcca89cba --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerFlexComponent_List.cs @@ -0,0 +1,460 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List FlexComponent resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByParent=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerFlexComponent_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponent))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List FlexComponent resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/flexComponents", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerFlexComponent_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes _shape; + + /// If provided, filters the results for the given shape + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If provided, filters the results for the given shape")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If provided, filters the results for the given shape", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes Shape { get => this._shape; set => this._shape = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerFlexComponent_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlexComponentsListByParent(SubscriptionId, Location, this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Shape=this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Shape=this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Shape=this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFlexComponentListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.FlexComponentsListByParent_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_Get.cs new file mode 100644 index 000000000000..cc1d44a93aec --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_Get.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a GiMinorVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerGiMinorVersion_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a GiMinorVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerGiMinorVersion_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _giversionname; + + /// GiVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "GiVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"GiVersion name", + SerializedName = @"giversionname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Giversionname { get => this._giversionname; set => this._giversionname = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the GiMinorVersion + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the GiMinorVersion")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the GiMinorVersion", + SerializedName = @"giMinorVersionName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("GiMinorVersionName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerGiMinorVersion_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiMinorVersionsGet(SubscriptionId, Location, Giversionname, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Giversionname=Giversionname,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Giversionname=Giversionname, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Giversionname=Giversionname, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity.cs new file mode 100644 index 000000000000..22bfbbe5d34c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a GiMinorVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a GiMinorVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions/{giMinorVersionName}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerGiMinorVersion_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.GiMinorVersionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Giversionname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Giversionname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.GiMinorVersionName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.GiMinorVersionName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.GiMinorVersionsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Giversionname ?? null, InputObject.GiMinorVersionName ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_List.cs new file mode 100644 index 000000000000..b15e23552356 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiMinorVersion_List.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List GiMinorVersion resources by GiVersion + /// + /// [OpenAPI] ListByParent=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerGiMinorVersion_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List GiMinorVersion resources by GiVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}/giMinorVersions", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerGiMinorVersion_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _giversionname; + + /// GiVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "GiVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"GiVersion name", + SerializedName = @"giversionname", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Giversionname { get => this._giversionname; set => this._giversionname = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily _shapeFamily; + + /// + /// If provided, filters the results to the set of database versions which are supported for the given shape family. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If provided, filters the results to the set of database versions which are supported for the given shape family.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If provided, filters the results to the set of database versions which are supported for the given shape family.", + SerializedName = @"shapeFamily", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ShapeFamily ShapeFamily { get => this._shapeFamily; set => this._shapeFamily = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _zone; + + /// Filters the result for the given Azure Availability Zone + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filters the result for the given Azure Availability Zone")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filters the result for the given Azure Availability Zone", + SerializedName = @"zone", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Query)] + public string Zone { get => this._zone; set => this._zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerGiMinorVersion_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiMinorVersionsListByParent(SubscriptionId, Location, Giversionname, this.InvocationInformation.BoundParameters.ContainsKey("ShapeFamily") ? ShapeFamily : null, this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Giversionname=Giversionname,ShapeFamily=this.InvocationInformation.BoundParameters.ContainsKey("ShapeFamily") ? ShapeFamily : null,Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Giversionname=Giversionname, ShapeFamily=this.InvocationInformation.BoundParameters.ContainsKey("ShapeFamily") ? ShapeFamily : null, Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Giversionname=Giversionname, ShapeFamily=this.InvocationInformation.BoundParameters.ContainsKey("ShapeFamily") ? ShapeFamily : null, Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiMinorVersionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiMinorVersionsListByParent_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_Get.cs new file mode 100644 index 000000000000..8df319e7b51b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a GiVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerGiVersion_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a GiVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerGiVersion_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// GiVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "GiVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"GiVersion name", + SerializedName = @"giversionname", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Giversionname")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerGiVersion_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiVersionsGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_GetViaIdentity.cs new file mode 100644 index 000000000000..d9375e7d001d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_GetViaIdentity.cs @@ -0,0 +1,416 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a GiVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerGiVersion_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a GiVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions/{giversionname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerGiVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerGiVersion_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.GiVersionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Giversionname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Giversionname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.GiVersionsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Giversionname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_List.cs new file mode 100644 index 000000000000..aac332fed2c8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerGiVersion_List.cs @@ -0,0 +1,474 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List GiVersion resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerGiVersion_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List GiVersion resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/giVersions", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerGiVersion_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes _shape; + + /// If provided, filters the results for the given shape + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If provided, filters the results for the given shape")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If provided, filters the results for the given shape", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Query)] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.SystemShapes Shape { get => this._shape; set => this._shape = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Backing field for property. + private string _zone; + + /// Filters the result for the given Azure Availability Zone + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Filters the result for the given Azure Availability Zone")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Filters the result for the given Azure Availability Zone", + SerializedName = @"zone", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Query)] + public string Zone { get => this._zone; set => this._zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerGiVersion_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiVersionsListByLocation(SubscriptionId, Location, this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null, this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Shape=this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null,Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Shape=this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null, Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Shape=this.InvocationInformation.BoundParameters.ContainsKey("Shape") ? Shape : null, Zone=this.InvocationInformation.BoundParameters.ContainsKey("Zone") ? Zone : null }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGiVersionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.GiVersionsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOperation_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOperation_List.cs new file mode 100644 index 000000000000..d76881ce8766 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOperation_List.cs @@ -0,0 +1,411 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List the operations for the provider + /// + /// [OpenAPI] List=>GET:"/providers/Oracle.Database/operations" + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.InternalExport] + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerOperation_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List the operations for the provider")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/providers/Oracle.Database/operations", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerOperation_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerOperation_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList(onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperationListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OperationsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List.cs new file mode 100644 index 000000000000..5657bb51d030 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List.cs @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List Activation Links + /// + /// [OpenAPI] ListActivationLinks=>POST:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List Activation Links")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listActivationLinks", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List Clone() + { + var clone = new GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerOracleSubscriptionActivationLink_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsListActivationLinks' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsListActivationLinks(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IActivationLinks + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List.cs new file mode 100644 index 000000000000..b4be2ab247f0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List.cs @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List Cloud Account Details + /// + /// [OpenAPI] ListCloudAccountDetails=>POST:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List Cloud Account Details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listCloudAccountDetails", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List Clone() + { + var clone = new GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsListCloudAccountDetails' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsListCloudAccountDetails(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudAccountDetails + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List.cs new file mode 100644 index 000000000000..8ed8ad12fd03 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List.cs @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List Saas Subscription Details + /// + /// [OpenAPI] ListSaasSubscriptionDetails=>POST:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List Saas Subscription Details")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default/listSaasSubscriptionDetails", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List Clone() + { + var clone = new GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsListSaasSubscriptionDetails' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsListSaasSubscriptionDetails(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISaasSubscriptionDetails + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_Get.cs new file mode 100644 index 000000000000..f7daa86c03c0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_Get.cs @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a OracleSubscription + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerOracleSubscription_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a OracleSubscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerOracleSubscription_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerOracleSubscription_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsGet(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity.cs new file mode 100644 index 000000000000..e5fc4712faa3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity.cs @@ -0,0 +1,409 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a OracleSubscription + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a OracleSubscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerOracleSubscription_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OracleSubscriptionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OracleSubscriptionsGet(InputObject.SubscriptionId ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_List.cs new file mode 100644 index 000000000000..157452b26cc8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerOracleSubscription_List.cs @@ -0,0 +1,431 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List OracleSubscription resources by subscription ID + /// + /// [OpenAPI] ListBySubscription=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerOracleSubscription_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List OracleSubscription resources by subscription ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerOracleSubscription_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerOracleSubscription_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsListBySubscription(SubscriptionId, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsListBySubscription_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_Get.cs new file mode 100644 index 000000000000..c389e528e24b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_Get.cs @@ -0,0 +1,438 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a SystemVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerSystemVersion_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a SystemVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerSystemVersion_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// SystemVersion name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "SystemVersion name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"SystemVersion name", + SerializedName = @"systemversionname", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Systemversionname")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerSystemVersion_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SystemVersionsGet(SubscriptionId, Location, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity.cs new file mode 100644 index 000000000000..9b529a0c3a9d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity.cs @@ -0,0 +1,417 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a SystemVersion + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a SystemVersion")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions/{systemversionname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public GetAzOracleDatabaseResourceManagerSystemVersion_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.SystemVersionsGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Location) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Location"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Systemversionname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Systemversionname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.SystemVersionsGet(InputObject.SubscriptionId ?? null, InputObject.Location ?? null, InputObject.Systemversionname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_List.cs new file mode 100644 index 000000000000..8253e8fd5dc4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerSystemVersion_List.cs @@ -0,0 +1,445 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List SystemVersion resources by SubscriptionLocationResource + /// + /// [OpenAPI] ListByLocation=>GET:"/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerSystemVersion_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersion))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List SystemVersion resources by SubscriptionLocationResource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/locations/{location}/systemVersions", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerSystemVersion_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// Backing field for property. + private string _location; + + /// The name of the Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the Azure region.", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerSystemVersion_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SystemVersionsListByLocation(SubscriptionId, Location, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,Location=Location}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, Location=Location }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ISystemVersionListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.SystemVersionsListByLocation_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_Get.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_Get.cs new file mode 100644 index 000000000000..35fc2f6b8e2d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_Get.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a VirtualNetworkAddress + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerVirtualNetworkAddress_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a VirtualNetworkAddress")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Virtual IP address hostname. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Virtual IP address hostname.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Virtual IP address hostname.", + SerializedName = @"virtualnetworkaddressname", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Virtualnetworkaddressname")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_Get() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.VirtualNetworkAddressesGet(SubscriptionId, ResourceGroupName, Cloudvmclustername, Name, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity.cs new file mode 100644 index 000000000000..25b61d16f54e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity.cs @@ -0,0 +1,421 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Get a VirtualNetworkAddress + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Get a VirtualNetworkAddress")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_GetViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.VirtualNetworkAddressesGetViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Virtualnetworkaddressname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Virtualnetworkaddressname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.VirtualNetworkAddressesGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, InputObject.Virtualnetworkaddressname ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_List.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_List.cs new file mode 100644 index 000000000000..fdd9b2948b4e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_List.cs @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// List VirtualNetworkAddress resources by CloudVmCluster + /// + /// [OpenAPI] ListByParent=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzOracleDatabaseResourceManagerVirtualNetworkAddress_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"List VirtualNetworkAddress resources by CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses", ApiVersion = "2025-03-01")] + public partial class GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// A flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string[] _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string[] SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzOracleDatabaseResourceManagerVirtualNetworkAddress_List() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + foreach( var SubscriptionId in this.SubscriptionId ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.VirtualNetworkAddressesListByParent(SubscriptionId, ResourceGroupName, Cloudvmclustername, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddressListResult + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + if (responseMessage.RequestMessage is System.Net.Http.HttpRequestMessage requestMessage ) + { + requestMessage = requestMessage.Clone(new global::System.Uri( _nextLink ),Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Method.Get ); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.FollowingNextLink); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.VirtualNetworkAddressesListByParent_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_Action.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_Action.cs new file mode 100644 index 000000000000..f8a88c0e3572 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_Action.cs @@ -0,0 +1,534 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionDbNode_Action", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionDbNode_Action : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body; + + /// DbNode action object + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode action object", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode action object", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionDbNode_Action + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionDbNode_Action Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionDbNode_Action(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Dbnodeocid = this.Dbnodeocid; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerActionDbNode_Action() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesAction(SubscriptionId, ResourceGroupName, Cloudvmclustername, Dbnodeocid, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Dbnodeocid=Dbnodeocid,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Dbnodeocid=Dbnodeocid, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Dbnodeocid=Dbnodeocid, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded.cs new file mode 100644 index 000000000000..dc50fb780f08 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded.cs @@ -0,0 +1,537 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionDbNode_ActionExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// DbNode action object + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeAction(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Db action + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db action")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Action { get => _body.Action; set => _body.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Backing field for property. + private string _dbnodeocid; + + /// DbNode OCID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode OCID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode OCID.", + SerializedName = @"dbnodeocid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Dbnodeocid { get => this._dbnodeocid; set => this._dbnodeocid = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Dbnodeocid = this.Dbnodeocid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.DbNodesAction(SubscriptionId, ResourceGroupName, Cloudvmclustername, Dbnodeocid, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Dbnodeocid=Dbnodeocid,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Dbnodeocid=Dbnodeocid, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Dbnodeocid=Dbnodeocid, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity.cs new file mode 100644 index 000000000000..f22a3a2f5754 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body; + + /// DbNode action object + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode action object", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode action object", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbNodesActionViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbnodeocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbnodeocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbNodesAction(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, InputObject.Dbnodeocid ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded.cs new file mode 100644 index 000000000000..a99c0bb05ec4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of VM Cluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of VM Cluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/dbNodes/{dbnodeocid}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// DbNode action object + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeAction(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Db action + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db action")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Action { get => _body.Action; set => _body.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerActionDbNode_ActionViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'DbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.DbNodesActionViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Dbnodeocid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Dbnodeocid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.DbNodesAction(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, InputObject.Dbnodeocid ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNode + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action.cs new file mode 100644 index 000000000000..7c0e26f9f8de --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action.cs @@ -0,0 +1,535 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionExascaleDbNode_Action", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of ExadbVmCluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body; + + /// DbNode action object + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode action object", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode action object", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _exadbVMClusterName; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExadbVMClusterName { get => this._exadbVMClusterName; set => this._exadbVMClusterName = value; } + + /// Backing field for property. + private string _exascaleDbNodeName; + + /// The name of the ExascaleDbNode + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExascaleDbNode")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExascaleDbNode", + SerializedName = @"exascaleDbNodeName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExascaleDbNodeName { get => this._exascaleDbNodeName; set => this._exascaleDbNodeName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ExadbVMClusterName = this.ExadbVMClusterName; + clone.ExascaleDbNodeName = this.ExascaleDbNodeName; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_Action() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbNodesAction(SubscriptionId, ResourceGroupName, ExadbVMClusterName, ExascaleDbNodeName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ExadbVMClusterName=ExadbVMClusterName,ExascaleDbNodeName=ExascaleDbNodeName,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, ExascaleDbNodeName=ExascaleDbNodeName, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, ExascaleDbNodeName=ExascaleDbNodeName, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + WriteObject((await response).ProvisioningState); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded.cs new file mode 100644 index 000000000000..fa7527455da8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded.cs @@ -0,0 +1,537 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of ExadbVmCluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// DbNode action object + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeAction(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Db action + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db action")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Action { get => _body.Action; set => _body.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _exadbVMClusterName; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExadbVMClusterName { get => this._exadbVMClusterName; set => this._exadbVMClusterName = value; } + + /// Backing field for property. + private string _exascaleDbNodeName; + + /// The name of the ExascaleDbNode + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExascaleDbNode")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExascaleDbNode", + SerializedName = @"exascaleDbNodeName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExascaleDbNodeName { get => this._exascaleDbNodeName; set => this._exascaleDbNodeName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ExadbVMClusterName = this.ExadbVMClusterName; + clone.ExascaleDbNodeName = this.ExascaleDbNodeName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbNodesAction(SubscriptionId, ResourceGroupName, ExadbVMClusterName, ExascaleDbNodeName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ExadbVMClusterName=ExadbVMClusterName,ExascaleDbNodeName=ExascaleDbNodeName,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, ExascaleDbNodeName=ExascaleDbNodeName, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, ExascaleDbNodeName=ExascaleDbNodeName, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + WriteObject((await response).ProvisioningState); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity.cs new file mode 100644 index 000000000000..3c9b0480936e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity.cs @@ -0,0 +1,503 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of ExadbVmCluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body; + + /// DbNode action object + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "DbNode action object", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"DbNode action object", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExascaleDbNodesActionViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExascaleDbNodeName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExascaleDbNodeName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExascaleDbNodesAction(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, InputObject.ExascaleDbNodeName ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + WriteObject((await response).ProvisioningState); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded.cs new file mode 100644 index 000000000000..f78fae33c981 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded.cs @@ -0,0 +1,505 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// VM actions on DbNode of ExadbVmCluster by the provided filter + /// + /// [OpenAPI] Action=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AzureResourceProvisioningState))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"VM actions on DbNode of ExadbVmCluster by the provided filter")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/dbNodes/{exascaleDbNodeName}/action", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// DbNode action object + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeAction _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DbNodeAction(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Db action + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db action")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db action", + SerializedName = @"action", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DbNodeActionEnum Action { get => _body.Action; set => _body.Action = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerActionExascaleDbNode_ActionViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbNodesAction' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExascaleDbNodesActionViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExascaleDbNodeName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExascaleDbNodeName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExascaleDbNodesAction(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, InputObject.ExascaleDbNodeName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbActionResponse + WriteObject((await response).ProvisioningState); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink.cs new file mode 100644 index 000000000000..f62a64aff522 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink.cs @@ -0,0 +1,508 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// + /// [OpenAPI] Shrink=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"This operation shrinks the current allocated storage down to the current actual used data storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_Shrink() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesShrink' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesShrink(SubscriptionId, ResourceGroupName, Autonomousdatabasename, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity.cs new file mode 100644 index 000000000000..a7bfce7d74eb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity.cs @@ -0,0 +1,487 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// + /// This operation shrinks the current allocated storage down to the current actual used data storage. + /// + /// + /// [OpenAPI] Shrink=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"This operation shrinks the current allocated storage down to the current actual used data storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/shrink", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerShrinkAutonomouDatabase_ShrinkViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesShrink' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesShrinkViaIdentity(InputObject.Id, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesShrink(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover.cs new file mode 100644 index 000000000000..527a12641051 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails _body; + + /// PeerDb Details + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "PeerDb Details", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"PeerDb Details", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_Switchover() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesSwitchover(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded.cs new file mode 100644 index 000000000000..121f7a2eb028 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded.cs @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// PeerDb Details + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PeerDbDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _body.PeerDbId ?? null; set => _body.PeerDbId = value; } + + /// The location of the Disaster Recovery peer database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the Disaster Recovery peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Disaster Recovery peer database.", + SerializedName = @"peerDbLocation", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbLocation { get => _body.PeerDbLocation ?? null; set => _body.PeerDbLocation = value; } + + /// + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbOcid", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbOcid { get => _body.PeerDbOcid ?? null; set => _body.PeerDbOcid = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesSwitchover(SubscriptionId, ResourceGroupName, Autonomousdatabasename, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity.cs new file mode 100644 index 000000000000..71a74d045609 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails _body; + + /// PeerDb Details + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "PeerDb Details", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"PeerDb Details", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentity() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesSwitchoverViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesSwitchover(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded.cs new file mode 100644 index 000000000000..2b2fcc306e73 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform switchover action on Autonomous Database + /// + /// [OpenAPI] Switchover=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform switchover action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/switchover", ApiVersion = "2025-03-01")] + public partial class InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// PeerDb Details + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IPeerDbDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.PeerDbDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _body.PeerDbId ?? null; set => _body.PeerDbId = value; } + + /// The location of the Disaster Recovery peer database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The location of the Disaster Recovery peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The location of the Disaster Recovery peer database.", + SerializedName = @"peerDbLocation", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbLocation { get => _body.PeerDbLocation ?? null; set => _body.PeerDbLocation = value; } + + /// + /// Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Ocid of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbOcid", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbOcid { get => _body.PeerDbOcid ?? null; set => _body.PeerDbOcid = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded Clone() + { + var clone = new InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase_SwitchoverViaIdentityExpanded() + { + + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesSwitchover' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesSwitchoverViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesSwitchover(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded.cs new file mode 100644 index 000000000000..ac3262741900 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded.cs @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a AutonomousDatabaseBackup + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// AutonomousDatabaseBackup resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackup(); + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the backup. The name does not have to be unique. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the backup. The name does not have to be unique.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Retention period, in days + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int RetentionPeriodInDay { get => _resourceBody.RetentionPeriodInDay ?? default(int); set => _resourceBody.RetentionPeriodInDay = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Adbbackupid = this.Adbbackupid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzOracleDatabaseResourceManagerAutonomouDatabaseBackup_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsCreateOrUpdate(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate.cs new file mode 100644 index 000000000000..b484fcc41a01 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate.cs @@ -0,0 +1,451 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Generate wallet action on Autonomous Database + /// + /// [OpenAPI] GenerateWallet=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Generate wallet action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails _body; + + /// Autonomous Database Generate Wallet resource model. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Autonomous Database Generate Wallet resource model.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Autonomous Database Generate Wallet resource model.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_Generate() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesGenerateWallet' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesGenerateWallet(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + WriteObject((await response).WalletFile); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded.cs new file mode 100644 index 000000000000..9c01c429289d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded.cs @@ -0,0 +1,477 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Generate wallet action on Autonomous Database + /// + /// [OpenAPI] GenerateWallet=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Generate wallet action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Autonomous Database Generate Wallet resource model. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GenerateAutonomousDatabaseWalletDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The type of wallet to generate. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of wallet to generate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of wallet to generate.", + SerializedName = @"generateType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType GenerateType { get => _body.GenerateType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType)""); set => _body.GenerateType = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only.", + SerializedName = @"isRegional", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsRegional { get => _body.IsRegional ?? default(global::System.Management.Automation.SwitchParameter); set => _body.IsRegional = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// The password to encrypt the keys inside the wallet + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The password to encrypt the keys inside the wallet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The password to encrypt the keys inside the wallet", + SerializedName = @"password", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString Password { get => _body.Password ?? null; set => _body.Password = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesGenerateWallet' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesGenerateWallet(SubscriptionId, ResourceGroupName, Autonomousdatabasename, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + WriteObject((await response).WalletFile); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity.cs new file mode 100644 index 000000000000..d6a3d8b1a1c0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity.cs @@ -0,0 +1,433 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Generate wallet action on Autonomous Database + /// + /// [OpenAPI] GenerateWallet=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Generate wallet action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails _body; + + /// Autonomous Database Generate Wallet resource model. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Autonomous Database Generate Wallet resource model.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Autonomous Database Generate Wallet resource model.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentity() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesGenerateWallet' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesGenerateWalletViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesGenerateWallet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + WriteObject((await response).WalletFile); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded.cs new file mode 100644 index 000000000000..5f03d623617e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded.cs @@ -0,0 +1,459 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Generate wallet action on Autonomous Database + /// + /// [OpenAPI] GenerateWallet=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(string))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Generate wallet action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/generateWallet", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Autonomous Database Generate Wallet resource model. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IGenerateAutonomousDatabaseWalletDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.GenerateAutonomousDatabaseWalletDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The type of wallet to generate. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of wallet to generate.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of wallet to generate.", + SerializedName = @"generateType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType GenerateType { get => _body.GenerateType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.GenerateType)""); set => _body.GenerateType = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"True when requesting regional connection strings in PDB connect info, applicable to cross-region DG only.", + SerializedName = @"isRegional", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsRegional { get => _body.IsRegional ?? default(global::System.Management.Automation.SwitchParameter); set => _body.IsRegional = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// The password to encrypt the keys inside the wallet + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The password to encrypt the keys inside the wallet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The password to encrypt the keys inside the wallet", + SerializedName = @"password", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString Password { get => _body.Password ?? null; set => _body.Password = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + var data = messageData(); + WriteInformation(data.Message, new string[]{}); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzOracleDatabaseResourceManagerAutonomouDatabaseWallet_GenerateViaIdentityExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesGenerateWallet' operation")) + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesGenerateWalletViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesGenerateWallet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseWalletFile + WriteObject((await response).WalletFile); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded.cs new file mode 100644 index 000000000000..d0c4a59afc2e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded.cs @@ -0,0 +1,1010 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a AutonomousDatabase + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Autonomous Database resource model. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabase(); + + /// Admin password. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Admin password.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdminPassword { get => _resourceBody.AdminPassword ?? null; set => _resourceBody.AdminPassword = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Autonomous Database ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Autonomous Database ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Autonomous Database ID", + SerializedName = @"autonomousDatabaseId", + PossibleTypes = new [] { typeof(string) })] + public string AutonomousDatabaseId { get => _resourceBody.AutonomousDatabaseId ?? null; set => _resourceBody.AutonomousDatabaseId = value; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance schedule type of the Autonomous Database Serverless.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType AutonomousMaintenanceScheduleType { get => _resourceBody.AutonomousMaintenanceScheduleType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); set => _resourceBody.AutonomousMaintenanceScheduleType = value; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Retention period, in days, for long-term backups + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for long-term backups")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int BackupRetentionPeriodInDay { get => _resourceBody.BackupRetentionPeriodInDay ?? default(int); set => _resourceBody.BackupRetentionPeriodInDay = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The character set for the autonomous database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The character set for the autonomous database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the autonomous database.", + SerializedName = @"characterSet", + PossibleTypes = new [] { typeof(string) })] + public string CharacterSet { get => _resourceBody.CharacterSet ?? null; set => _resourceBody.CharacterSet = value; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The compute amount (CPUs) available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute amount (CPUs) available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + public float ComputeCount { get => _resourceBody.ComputeCount ?? default(float); set => _resourceBody.ComputeCount = value; } + + /// The compute model of the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute model of the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute model of the Autonomous Database.", + SerializedName = @"computeModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel ComputeModel { get => _resourceBody.ComputeModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.ComputeModel)""); set => _resourceBody.ComputeModel = value; } + + /// The number of CPU cores to be made available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores to be made available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _resourceBody.CpuCoreCount ?? default(int); set => _resourceBody.CpuCoreCount = value; } + + /// Customer Contacts. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Customer Contacts.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => _resourceBody.CustomerContact ?? null /* arrayOf */; set => _resourceBody.CustomerContact = value; } + + /// Database type to be created. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Database type to be created.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Database type to be created.", + SerializedName = @"dataBaseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType DataBaseType { get => _resourceBody.DataBaseType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DataBaseType)""); set => _resourceBody.DataBaseType = value; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size, in gigabytes, of the data volume that will be created and attached to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInGb { get => _resourceBody.DataStorageSizeInGb ?? default(int); set => _resourceBody.DataStorageSizeInGb = value; } + + /// The quantity of data in the database, in terabytes. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The quantity of data in the database, in terabytes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInTb { get => _resourceBody.DataStorageSizeInTb ?? default(int); set => _resourceBody.DataStorageSizeInTb = value; } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle Database Edition that applies to the Autonomous databases.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType DatabaseEdition { get => _resourceBody.DatabaseEdition ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); set => _resourceBody.DatabaseEdition = value; } + + /// Name of the day of the week. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the day of the week.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName DayOfWeekName { get => _resourceBody.DayOfWeekName ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); set => _resourceBody.DayOfWeekName = value; } + + /// A valid Oracle Database version for Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A valid Oracle Database version for Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A valid Oracle Database version for Autonomous Database.", + SerializedName = @"dbVersion", + PossibleTypes = new [] { typeof(string) })] + public string DbVersion { get => _resourceBody.DbVersion ?? null; set => _resourceBody.DbVersion = value; } + + /// The Autonomous Database workload type + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Autonomous Database workload type")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database workload type", + SerializedName = @"dbWorkload", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType DbWorkload { get => _resourceBody.DbWorkload ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.WorkloadType)""); set => _resourceBody.DbWorkload = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database CPU core count.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingEnabled { get => _resourceBody.IsAutoScalingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsAutoScalingEnabled = value; } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingForStorageEnabled { get => _resourceBody.IsAutoScalingForStorageEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsAutoScalingForStorageEnabled = value; } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalDataGuardEnabled { get => _resourceBody.IsLocalDataGuardEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsLocalDataGuardEnabled = value; } + + /// Specifies if the Autonomous Database requires mTLS connections. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database requires mTLS connections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsMtlsConnectionRequired { get => _resourceBody.IsMtlsConnectionRequired ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsMtlsConnectionRequired = value; } + + /// Specifies if the Autonomous Database preview version is being provisioned. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database preview version is being provisioned.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database preview version is being provisioned.", + SerializedName = @"isPreviewVersionWithServiceTermsAccepted", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsPreviewVersionWithServiceTermsAccepted { get => _resourceBody.IsPreviewVersionWithServiceTermsAccepted ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsPreviewVersionWithServiceTermsAccepted = value; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseModel { get => _resourceBody.LicenseModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); set => _resourceBody.LicenseModel = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + public int LocalAdgAutoFailoverMaxDataLossLimit { get => _resourceBody.LocalAdgAutoFailoverMaxDataLossLimit ?? default(int); set => _resourceBody.LocalAdgAutoFailoverMaxDataLossLimit = value; } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter LongTermBackupScheduleIsDisabled { get => _resourceBody.LongTermBackupScheduleIsDisabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.LongTermBackupScheduleIsDisabled = value; } + + /// The frequency of the long-term backup schedule + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The frequency of the long-term backup schedule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType LongTermBackupScheduleRepeatCadence { get => _resourceBody.LongTermBackupScheduleRepeatCadence ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); set => _resourceBody.LongTermBackupScheduleRepeatCadence = value; } + + /// Retention period, in days, for backups. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for backups.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int LongTermBackupScheduleRetentionPeriodInDay { get => _resourceBody.LongTermBackupScheduleRetentionPeriodInDay ?? default(int); set => _resourceBody.LongTermBackupScheduleRetentionPeriodInDay = value; } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime LongTermBackupScheduleTimeOfBackup { get => _resourceBody.LongTermBackupScheduleTimeOfBackup ?? default(global::System.DateTime); set => _resourceBody.LongTermBackupScheduleTimeOfBackup = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// The character set for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The character set for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The character set for the Autonomous Database.", + SerializedName = @"ncharacterSet", + PossibleTypes = new [] { typeof(string) })] + public string NcharacterSet { get => _resourceBody.NcharacterSet ?? null; set => _resourceBody.NcharacterSet = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Indicates the Autonomous Database mode. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the Autonomous Database mode.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType OpenMode { get => _resourceBody.OpenMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); set => _resourceBody.OpenMode = value; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _resourceBody.PropertiesPeerDbId ?? null; set => _resourceBody.PropertiesPeerDbId = value; } + + /// The Autonomous Database permission level. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Autonomous Database permission level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType PermissionLevel { get => _resourceBody.PermissionLevel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); set => _resourceBody.PermissionLevel = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The private endpoint Ip address for the resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The private endpoint Ip address for the resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The private endpoint Ip address for the resource.", + SerializedName = @"privateEndpointIp", + PossibleTypes = new [] { typeof(string) })] + public string PrivateEndpointIP { get => _resourceBody.PrivateEndpointIP ?? null; set => _resourceBody.PrivateEndpointIP = value; } + + /// The resource's private endpoint label. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The resource's private endpoint label.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource's private endpoint label.", + SerializedName = @"privateEndpointLabel", + PossibleTypes = new [] { typeof(string) })] + public string PrivateEndpointLabel { get => _resourceBody.PrivateEndpointLabel ?? null; set => _resourceBody.PrivateEndpointLabel = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType Role { get => _resourceBody.Role ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); set => _resourceBody.Role = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto start time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledOperationScheduledStartTime { get => _resourceBody.ScheduledOperationScheduledStartTime ?? null; set => _resourceBody.ScheduledOperationScheduledStartTime = value; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto stop time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledOperationScheduledStopTime { get => _resourceBody.ScheduledOperationScheduledStopTime ?? null; set => _resourceBody.ScheduledOperationScheduledStopTime = value; } + + /// Client subnet + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client subnet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + public string SubnetId { get => _resourceBody.SubnetId ?? null; set => _resourceBody.SubnetId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// VNET for network connectivity + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "VNET for network connectivity")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + public string VnetId { get => _resourceBody.VnetId ?? null; set => _resourceBody.VnetId = value; } + + /// + /// 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'] + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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']")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + public string[] WhitelistedIP { get => _resourceBody.WhitelistedIP ?? null /* arrayOf */; set => _resourceBody.WhitelistedIP = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public NewAzOracleDatabaseResourceManagerAutonomouDatabase_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesCreateOrUpdate(SubscriptionId, ResourceGroupName, Autonomousdatabasename, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded.cs new file mode 100644 index 000000000000..50c1411ce12c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded.cs @@ -0,0 +1,765 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a CloudExadataInfrastructure + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// CloudExadataInfrastructure resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructure(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The number of compute servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of compute servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + public int ComputeCount { get => _resourceBody.ComputeCount ?? default(int); set => _resourceBody.ComputeCount = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => _resourceBody.CustomerContact ?? null /* arrayOf */; set => _resourceBody.CustomerContact = value; } + + /// The database server model type of the cloud Exadata infrastructure resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The database server model type of the cloud Exadata infrastructure resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The database server model type of the cloud Exadata infrastructure resource.", + SerializedName = @"databaseServerType", + PossibleTypes = new [] { typeof(string) })] + public string DatabaseServerType { get => _resourceBody.DatabaseServerType ?? null; set => _resourceBody.DatabaseServerType = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The name for the Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name for the Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// 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). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowCustomActionTimeoutInMin { get => _resourceBody.MaintenanceWindowCustomActionTimeoutInMin ?? default(int); set => _resourceBody.MaintenanceWindowCustomActionTimeoutInMin = value; } + + /// Days during the week when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Days during the week when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => _resourceBody.MaintenanceWindowDaysOfWeek ?? null /* arrayOf */; set => _resourceBody.MaintenanceWindowDaysOfWeek = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowHoursOfDay { get => _resourceBody.MaintenanceWindowHoursOfDay ?? null /* arrayOf */; set => _resourceBody.MaintenanceWindowHoursOfDay = value; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsCustomActionTimeoutEnabled { get => _resourceBody.MaintenanceWindowIsCustomActionTimeoutEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.MaintenanceWindowIsCustomActionTimeoutEnabled = value; } + + /// is Monthly Patching Enabled + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "is Monthly Patching Enabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsMonthlyPatchingEnabled { get => _resourceBody.MaintenanceWindowIsMonthlyPatchingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.MaintenanceWindowIsMonthlyPatchingEnabled = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowLeadTimeInWeek { get => _resourceBody.MaintenanceWindowLeadTimeInWeek ?? default(int); set => _resourceBody.MaintenanceWindowLeadTimeInWeek = value; } + + /// Months during the year when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Months during the year when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get => _resourceBody.MaintenanceWindowMonth ?? null /* arrayOf */; set => _resourceBody.MaintenanceWindowMonth = value; } + + /// Cloud Exadata infrastructure node patching method. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata infrastructure node patching method.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode MaintenanceWindowPatchingMode { get => _resourceBody.MaintenanceWindowPatchingMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode)""); set => _resourceBody.MaintenanceWindowPatchingMode = value; } + + /// The maintenance window scheduling preference. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance window scheduling preference.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference MaintenanceWindowPreference { get => _resourceBody.MaintenanceWindowPreference ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference)""); set => _resourceBody.MaintenanceWindowPreference = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowWeeksOfMonth { get => _resourceBody.MaintenanceWindowWeeksOfMonth ?? null /* arrayOf */; set => _resourceBody.MaintenanceWindowWeeksOfMonth = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The model name of the cloud Exadata infrastructure resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The model name of the cloud Exadata infrastructure resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The model name of the cloud Exadata infrastructure resource.", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + public string Shape { get => _resourceBody.Shape ?? null; set => _resourceBody.Shape = value; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of storage servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + public int StorageCount { get => _resourceBody.StorageCount ?? default(int); set => _resourceBody.StorageCount = value; } + + /// The storage server model type of the cloud Exadata infrastructure resource. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The storage server model type of the cloud Exadata infrastructure resource.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The storage server model type of the cloud Exadata infrastructure resource.", + SerializedName = @"storageServerType", + PossibleTypes = new [] { typeof(string) })] + public string StorageServerType { get => _resourceBody.StorageServerType ?? null; set => _resourceBody.StorageServerType = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// CloudExadataInfrastructure zones + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure zones")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _resourceBody.Zone ?? null /* arrayOf */; set => _resourceBody.Zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzOracleDatabaseResourceManagerCloudExadataInfrastructure_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded.cs new file mode 100644 index 000000000000..a8a2ad423e71 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded.cs @@ -0,0 +1,921 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a CloudVmCluster + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// CloudVmCluster resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMCluster(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client OCI backup subnet CIDR, default is 192.168.252.0/22")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + public string BackupSubnetCidr { get => _resourceBody.BackupSubnetCidr ?? null; set => _resourceBody.BackupSubnetCidr = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Cloud Exadata Infrastructure ID + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata Infrastructure ID")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata Infrastructure ID", + SerializedName = @"cloudExadataInfrastructureId", + PossibleTypes = new [] { typeof(string) })] + public string CloudExadataInfrastructureId { get => _resourceBody.CloudExadataInfrastructureId ?? null; set => _resourceBody.CloudExadataInfrastructureId = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + public string ClusterName { get => _resourceBody.ClusterName ?? null; set => _resourceBody.ClusterName = value; } + + /// The list of compute servers to be added to the cloud VM cluster. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of compute servers to be added to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + public string[] ComputeNode { get => _resourceBody.ComputeNode ?? null /* arrayOf */; set => _resourceBody.ComputeNode = value; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores enabled on the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _resourceBody.CpuCoreCount ?? default(int); set => _resourceBody.CpuCoreCount = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsDiagnosticsEventsEnabled { get => _resourceBody.DataCollectionOptionIsDiagnosticsEventsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsDiagnosticsEventsEnabled = value; } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsHealthMonitoringEnabled { get => _resourceBody.DataCollectionOptionIsHealthMonitoringEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsHealthMonitoringEnabled = value; } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsIncidentLogsEnabled { get => _resourceBody.DataCollectionOptionIsIncidentLogsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsIncidentLogsEnabled = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"dataStoragePercentage", + PossibleTypes = new [] { typeof(int) })] + public int DataStoragePercentage { get => _resourceBody.DataStoragePercentage ?? default(int); set => _resourceBody.DataStoragePercentage = value; } + + /// The data disk group size to be allocated in TBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in TBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + public double DataStorageSizeInTb { get => _resourceBody.DataStorageSizeInTb ?? default(double); set => _resourceBody.DataStorageSizeInTb = value; } + + /// The local node storage to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The local node storage to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DbNodeStorageSizeInGb { get => _resourceBody.DbNodeStorageSizeInGb ?? default(int); set => _resourceBody.DbNodeStorageSizeInGb = value; } + + /// The list of DB servers. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of DB servers.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of DB servers.", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _resourceBody.DbServer ?? null /* arrayOf */; set => _resourceBody.DbServer = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Display Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Display Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// The domain name for the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The domain name for the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The domain name for the cloud VM cluster.", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + public string Domain { get => _resourceBody.Domain ?? null; set => _resourceBody.Domain = value; } + + /// Array of mount path and size. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of mount path and size.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of mount path and size.", + SerializedName = @"fileSystemConfigurationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get => _resourceBody.FileSystemConfigurationDetail ?? null /* arrayOf */; set => _resourceBody.FileSystemConfigurationDetail = value; } + + /// Oracle Grid Infrastructure (GI) software version + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Oracle Grid Infrastructure (GI) software version")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Oracle Grid Infrastructure (GI) software version", + SerializedName = @"giVersion", + PossibleTypes = new [] { typeof(string) })] + public string GiVersion { get => _resourceBody.GiVersion ?? null; set => _resourceBody.GiVersion = value; } + + /// The hostname for the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The hostname for the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The hostname for the cloud VM cluster.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + public string Hostname { get => _resourceBody.Hostname ?? null; set => _resourceBody.Hostname = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"isLocalBackupEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalBackupEnabled { get => _resourceBody.IsLocalBackupEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsLocalBackupEnabled = value; } + + /// + /// If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, sparse disk group is configured for the cloud VM cluster. If false, sparse disk group is not created. ", + SerializedName = @"isSparseDiskgroupEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsSparseDiskgroupEnabled { get => _resourceBody.IsSparseDiskgroupEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.IsSparseDiskgroupEnabled = value; } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseModel { get => _resourceBody.LicenseModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); set => _resourceBody.LicenseModel = value; } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// The memory to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The memory to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int MemorySizeInGb { get => _resourceBody.MemorySizeInGb ?? default(int); set => _resourceBody.MemorySizeInGb = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get => _resourceBody.NsgCidr ?? null /* arrayOf */; set => _resourceBody.NsgCidr = value; } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + public float OcpuCount { get => _resourceBody.OcpuCount ?? default(float); set => _resourceBody.OcpuCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The TCP Single Client Access Name (SCAN) port. The default port is 1521.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + public int ScanListenerPortTcp { get => _resourceBody.ScanListenerPortTcp ?? default(int); set => _resourceBody.ScanListenerPortTcp = value; } + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The TCPS Single Client Access Name (SCAN) port. The default port is 2484.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + public int ScanListenerPortTcpSsl { get => _resourceBody.ScanListenerPortTcpSsl ?? default(int); set => _resourceBody.ScanListenerPortTcpSsl = value; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + public string[] SshPublicKey { get => _resourceBody.SshPublicKey ?? null /* arrayOf */; set => _resourceBody.SshPublicKey = value; } + + /// The data disk group size to be allocated in GBs per VM. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in GBs per VM.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int StorageSizeInGb { get => _resourceBody.StorageSizeInGb ?? default(int); set => _resourceBody.StorageSizeInGb = value; } + + /// Client subnet + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client subnet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + public string SubnetId { get => _resourceBody.SubnetId ?? null; set => _resourceBody.SubnetId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Operating system version of the image. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system version of the image.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + public string SystemVersion { get => _resourceBody.SystemVersion ?? null; set => _resourceBody.SystemVersion = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// + /// The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone of the cloud VM cluster. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + public string TimeZone { get => _resourceBody.TimeZone ?? null; set => _resourceBody.TimeZone = value; } + + /// VNET for network connectivity + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "VNET for network connectivity")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + public string VnetId { get => _resourceBody.VnetId ?? null; set => _resourceBody.VnetId = value; } + + /// The OCID of the zone the cloud VM cluster is associated with. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The OCID of the zone the cloud VM cluster is associated with.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the zone the cloud VM cluster is associated with.", + SerializedName = @"zoneId", + PossibleTypes = new [] { typeof(string) })] + public string ZoneId { get => _resourceBody.ZoneId ?? null; set => _resourceBody.ZoneId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public NewAzOracleDatabaseResourceManagerCloudVMCluster_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded.cs new file mode 100644 index 000000000000..540d326dfa00 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded.cs @@ -0,0 +1,848 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a ExadbVmCluster + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// ExadbVmCluster resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMCluster(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Client OCI backup subnet CIDR, default is 192.168.252.0/22 + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client OCI backup subnet CIDR, default is 192.168.252.0/22")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client OCI backup subnet CIDR, default is 192.168.252.0/22", + SerializedName = @"backupSubnetCidr", + PossibleTypes = new [] { typeof(string) })] + public string BackupSubnetCidr { get => _resourceBody.BackupSubnetCidr ?? null; set => _resourceBody.BackupSubnetCidr = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, + /// and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and + /// is not case sensitive. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The cluster name for Exadata VM cluster on Exascale Infrastructure. The cluster name must begin with an alphabetic character, and may contain hyphens (-). Underscores (_) are not permitted. The cluster name can be no longer than 11 characters and is not case sensitive.", + SerializedName = @"clusterName", + PossibleTypes = new [] { typeof(string) })] + public string ClusterName { get => _resourceBody.ClusterName ?? null; set => _resourceBody.ClusterName = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsDiagnosticsEventsEnabled { get => _resourceBody.DataCollectionOptionIsDiagnosticsEventsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsDiagnosticsEventsEnabled = value; } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsHealthMonitoringEnabled { get => _resourceBody.DataCollectionOptionIsHealthMonitoringEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsHealthMonitoringEnabled = value; } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsIncidentLogsEnabled { get => _resourceBody.DataCollectionOptionIsIncidentLogsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _resourceBody.DataCollectionOptionIsIncidentLogsEnabled = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Display Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Display Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// A domain name used for the Exadata VM cluster on Exascale Infrastructure + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A domain name used for the Exadata VM cluster on Exascale Infrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A domain name used for the Exadata VM cluster on Exascale Infrastructure", + SerializedName = @"domain", + PossibleTypes = new [] { typeof(string) })] + public string Domain { get => _resourceBody.Domain ?? null; set => _resourceBody.Domain = value; } + + /// + /// The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of ECPUs to enable for an Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"enabledEcpuCount", + PossibleTypes = new [] { typeof(int) })] + public int EnabledEcpuCount { get => _resourceBody.EnabledEcpuCount ?? default(int); set => _resourceBody.EnabledEcpuCount = value; } + + /// The Azure Resource ID of the Exadata Database Storage Vault. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Azure Resource ID of the Exadata Database Storage Vault.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure Resource ID of the Exadata Database Storage Vault.", + SerializedName = @"exascaleDbStorageVaultId", + PossibleTypes = new [] { typeof(string) })] + public string ExascaleDbStorageVaultId { get => _resourceBody.ExascaleDbStorageVaultId ?? null; set => _resourceBody.ExascaleDbStorageVaultId = value; } + + /// + /// Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Grid Setup will be done using this Grid Image OCID. Can be obtained using giMinorVersions API", + SerializedName = @"gridImageOcid", + PossibleTypes = new [] { typeof(string) })] + public string GridImageOcid { get => _resourceBody.GridImageOcid ?? null; set => _resourceBody.GridImageOcid = value; } + + /// The hostname for the Exadata VM cluster on Exascale Infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The hostname for the Exadata VM cluster on Exascale Infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The hostname for the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"hostname", + PossibleTypes = new [] { typeof(string) })] + public string Hostname { get => _resourceBody.Hostname ?? null; set => _resourceBody.Hostname = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Exadata VM cluster on Exascale Infrastructure. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseModel { get => _resourceBody.LicenseModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); set => _resourceBody.LicenseModel = value; } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExadbVMClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of nodes in the Exadata VM cluster on Exascale Infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + public int NodeCount { get => _resourceBody.NodeCount ?? default(int); set => _resourceBody.NodeCount = value; } + + /// + /// CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CIDR blocks for additional NSG ingress rules. The VNET CIDRs used to provision the VM Cluster will be added by default.", + SerializedName = @"nsgCidrs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.INsgCidr[] NsgCidr { get => _resourceBody.NsgCidr ?? null /* arrayOf */; set => _resourceBody.NsgCidr = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// + /// The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The OCID of the zone the Exadata VM cluster on Exascale Infrastructure is associated with.", + SerializedName = @"privateZoneOcid", + PossibleTypes = new [] { typeof(string) })] + public string PrivateZoneOcid { get => _resourceBody.PrivateZoneOcid ?? null; set => _resourceBody.PrivateZoneOcid = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The TCP Single Client Access Name (SCAN) port. The default port is 1521. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The TCP Single Client Access Name (SCAN) port. The default port is 1521.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCP Single Client Access Name (SCAN) port. The default port is 1521.", + SerializedName = @"scanListenerPortTcp", + PossibleTypes = new [] { typeof(int) })] + public int ScanListenerPortTcp { get => _resourceBody.ScanListenerPortTcp ?? default(int); set => _resourceBody.ScanListenerPortTcp = value; } + + /// The TCPS Single Client Access Name (SCAN) port. The default port is 2484. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The TCPS Single Client Access Name (SCAN) port. The default port is 2484.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The TCPS Single Client Access Name (SCAN) port. The default port is 2484.", + SerializedName = @"scanListenerPortTcpSsl", + PossibleTypes = new [] { typeof(int) })] + public int ScanListenerPortTcpSsl { get => _resourceBody.ScanListenerPortTcpSsl ?? default(int); set => _resourceBody.ScanListenerPortTcpSsl = value; } + + /// The shape of the Exadata VM cluster on Exascale Infrastructure resource + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The shape of the Exadata VM cluster on Exascale Infrastructure resource")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The shape of the Exadata VM cluster on Exascale Infrastructure resource", + SerializedName = @"shape", + PossibleTypes = new [] { typeof(string) })] + public string Shape { get => _resourceBody.Shape ?? null; set => _resourceBody.Shape = value; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + public string[] SshPublicKey { get => _resourceBody.SshPublicKey ?? null /* arrayOf */; set => _resourceBody.SshPublicKey = value; } + + /// Client subnet + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Client subnet")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Client subnet", + SerializedName = @"subnetId", + PossibleTypes = new [] { typeof(string) })] + public string SubnetId { get => _resourceBody.SubnetId ?? null; set => _resourceBody.SubnetId = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Operating system version of the image. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Operating system version of the image.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Operating system version of the image.", + SerializedName = @"systemVersion", + PossibleTypes = new [] { typeof(string) })] + public string SystemVersion { get => _resourceBody.SystemVersion ?? null; set => _resourceBody.SystemVersion = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// + /// The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone of the Exadata VM cluster on Exascale Infrastructure. For details, see [Exadata Infrastructure Time Zones](/Content/Database/References/timezones.htm).", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + public string TimeZone { get => _resourceBody.TimeZone ?? null; set => _resourceBody.TimeZone = value; } + + /// The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of Total ECPUs for an Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"totalEcpuCount", + PossibleTypes = new [] { typeof(int) })] + public int TotalEcpuCount { get => _resourceBody.TotalEcpuCount ?? default(int); set => _resourceBody.TotalEcpuCount = value; } + + /// Total Capacity + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Total Capacity")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int VMFileSystemStorageTotalSizeInGb { get => _resourceBody.VMFileSystemStorageTotalSizeInGb ?? default(int); set => _resourceBody.VMFileSystemStorageTotalSizeInGb = value; } + + /// VNET for network connectivity + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "VNET for network connectivity")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"VNET for network connectivity", + SerializedName = @"vnetId", + PossibleTypes = new [] { typeof(string) })] + public string VnetId { get => _resourceBody.VnetId ?? null; set => _resourceBody.VnetId = value; } + + /// The availability zones. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The availability zones.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability zones.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _resourceBody.Zone ?? null /* arrayOf */; set => _resourceBody.Zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public NewAzOracleDatabaseResourceManagerExadbVMCluster_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersCreateOrUpdate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded.cs new file mode 100644 index 000000000000..e347f539add9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded.cs @@ -0,0 +1,605 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a ExascaleDbStorageVault + /// + /// [OpenAPI] Create=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a ExascaleDbStorageVault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// ExascaleDbStorageVault resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVault(); + + /// + /// The size of additional Flash Cache in percentage of High Capacity database storage. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size of additional Flash Cache in percentage of High Capacity database storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size of additional Flash Cache in percentage of High Capacity database storage.", + SerializedName = @"additionalFlashCacheInPercent", + PossibleTypes = new [] { typeof(int) })] + public int AdditionalFlashCacheInPercent { get => _resourceBody.AdditionalFlashCacheInPercent ?? default(int); set => _resourceBody.AdditionalFlashCacheInPercent = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Exadata Database Storage Vault description. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Exadata Database Storage Vault description.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Exadata Database Storage Vault description.", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + public string Description { get => _resourceBody.Description ?? null; set => _resourceBody.Description = value; } + + /// + /// The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Exadata Database Storage Vault. The name does not need to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _resourceBody.DisplayName ?? null; set => _resourceBody.DisplayName = value; } + + /// Total Capacity + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Total Capacity")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Total Capacity", + SerializedName = @"totalSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int HighCapacityDatabaseStorageInputTotalSizeInGb { get => _resourceBody.HighCapacityDatabaseStorageInputTotalSizeInGb ?? default(int); set => _resourceBody.HighCapacityDatabaseStorageInputTotalSizeInGb = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// The geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _resourceBody.Location ?? null; set => _resourceBody.Location = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExascaleDbStorageVault + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExascaleDbStorageVault")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExascaleDbStorageVault", + SerializedName = @"exascaleDbStorageVaultName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExascaleDbStorageVaultName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.ITrackedResourceTags Tag { get => _resourceBody.Tag ?? null /* object */; set => _resourceBody.Tag = value; } + + /// The time zone that you want to use for the Exadata Database Storage Vault + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The time zone that you want to use for the Exadata Database Storage Vault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The time zone that you want to use for the Exadata Database Storage Vault", + SerializedName = @"timeZone", + PossibleTypes = new [] { typeof(string) })] + public string TimeZone { get => _resourceBody.TimeZone ?? null; set => _resourceBody.TimeZone = value; } + + /// The availability zones. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The availability zones.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability zones.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _resourceBody.Zone ?? null /* arrayOf */; set => _resourceBody.Zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public NewAzOracleDatabaseResourceManagerExascaleDbStorageVault_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbStorageVaultsCreate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsCreate(SubscriptionId, ResourceGroupName, Name, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded.cs new file mode 100644 index 000000000000..d00608c53cf1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded.cs @@ -0,0 +1,574 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a OracleSubscription + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a OracleSubscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// OracleSubscription resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscription(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Intent for the update operation + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Intent for the update operation")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent Intent { get => _resourceBody.Intent ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent)""); set => _resourceBody.Intent = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// A user defined name of the 3rd Party Artifact that is being procured. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A user defined name of the 3rd Party Artifact that is being procured.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string PlanName { get => _resourceBody.PlanName ?? null; set => _resourceBody.PlanName = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + public string PlanProduct { get => _resourceBody.PlanProduct ?? null; set => _resourceBody.PlanProduct = value; } + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + public string PlanPromotionCode { get => _resourceBody.PlanPromotionCode ?? null; set => _resourceBody.PlanPromotionCode = value; } + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + public string PlanPublisher { get => _resourceBody.PlanPublisher ?? null; set => _resourceBody.PlanPublisher = value; } + + /// The version of the desired product/artifact. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The version of the desired product/artifact.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + public string PlanVersion { get => _resourceBody.PlanVersion ?? null; set => _resourceBody.PlanVersion = value; } + + /// Product code for the term unit + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Product code for the term unit")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + public string ProductCode { get => _resourceBody.ProductCode ?? null; set => _resourceBody.ProductCode = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601 + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Term Unit. P1Y, P3Y, etc, see Durations https://en.wikipedia.org/wiki/ISO_8601", + SerializedName = @"termUnit", + PossibleTypes = new [] { typeof(string) })] + public string TermUnit { get => _resourceBody.TermUnit ?? null; set => _resourceBody.TermUnit = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public NewAzOracleDatabaseResourceManagerOracleSubscription_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsCreateOrUpdate(SubscriptionId, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded.cs new file mode 100644 index 000000000000..9377bbe3898d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded.cs @@ -0,0 +1,548 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Create a VirtualNetworkAddress + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Create a VirtualNetworkAddress")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", ApiVersion = "2025-03-01")] + public partial class NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Virtual IP resource belonging to a vm cluster resource. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress _resourceBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.VirtualNetworkAddress(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Virtual network Address address. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Virtual network Address address.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual network Address address.", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + public string IPAddress { get => _resourceBody.IPAddress ?? null; set => _resourceBody.IPAddress = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Virtual IP address hostname. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Virtual IP address hostname.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Virtual IP address hostname.", + SerializedName = @"virtualnetworkaddressname", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Virtualnetworkaddressname")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Virtual Machine OCID. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Virtual Machine OCID.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Virtual Machine OCID.", + SerializedName = @"vmOcid", + PossibleTypes = new [] { typeof(string) })] + public string VMOcid { get => _resourceBody.VMOcid ?? null; set => _resourceBody.VMOcid = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded Clone() + { + var clone = new NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._resourceBody = this._resourceBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public NewAzOracleDatabaseResourceManagerVirtualNetworkAddress_CreateExpanded() + { + + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'VirtualNetworkAddressesCreateOrUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.VirtualNetworkAddressesCreateOrUpdate(SubscriptionId, ResourceGroupName, Cloudvmclustername, Name, _resourceBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Name=Name,body=_resourceBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Name=Name, body=_resourceBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IVirtualNetworkAddress + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete.cs new file mode 100644 index 000000000000..6e5e914b6fe4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete.cs @@ -0,0 +1,526 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a AutonomousDatabaseBackup + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Adbbackupid = this.Adbbackupid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsDelete(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity.cs new file mode 100644 index 000000000000..4c83738b3942 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a AutonomousDatabaseBackup + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseBackupsDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbbackupid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbbackupid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseBackupsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, InputObject.Adbbackupid ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete.cs new file mode 100644 index 000000000000..a0dd04a682f7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a AutonomousDatabase + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerAutonomousDatabase_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity.cs new file mode 100644 index 000000000000..6a461327c0de --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a AutonomousDatabase + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerAutonomousDatabase_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete.cs new file mode 100644 index 000000000000..07464eb832f1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a CloudExadataInfrastructure + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity.cs new file mode 100644 index 000000000000..7e5da9803d13 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a CloudExadataInfrastructure + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudExadataInfrastructuresDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudExadataInfrastructuresDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudExadataInfrastructure_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove.cs new file mode 100644 index 000000000000..38e1d9177ac6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove.cs @@ -0,0 +1,519 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_Remove", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body; + + /// Add/Remove (Virtual Machine) DbNode model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Add/Remove (Virtual Machine) DbNode model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Add/Remove (Virtual Machine) DbNode model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersRemoveVms(SubscriptionId, ResourceGroupName, Cloudvmclustername, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_Remove() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded.cs new file mode 100644 index 000000000000..729c65bbf035 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer ?? null /* arrayOf */; set => _body.DbServer = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersRemoveVms(SubscriptionId, ResourceGroupName, Cloudvmclustername, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity.cs new file mode 100644 index 000000000000..b8a2d565390e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body; + + /// Add/Remove (Virtual Machine) DbNode model + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Add/Remove (Virtual Machine) DbNode model", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Add/Remove (Virtual Machine) DbNode model", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersRemoveVmsViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersRemoveVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded.cs new file mode 100644 index 000000000000..02d36dc04055 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Add/Remove (Virtual Machine) DbNode model + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAddRemoveDbNode _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AddRemoveDbNode(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Db servers ocids + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Db servers ocids")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Db servers ocids", + SerializedName = @"dbServers", + PossibleTypes = new [] { typeof(string) })] + public string[] DbServer { get => _body.DbServer ?? null /* arrayOf */; set => _body.DbServer = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersRemoveVmsViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersRemoveVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudVMClusterVM_RemoveViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete.cs new file mode 100644 index 000000000000..2fc9199d5ac4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete.cs @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a CloudVmCluster + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudVMCluster_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudVMCluster_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity.cs new file mode 100644 index 000000000000..7b8f881ea02f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a CloudVmCluster + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerCloudVMCluster_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove.cs new file mode 100644 index 000000000000..5a0c8e13e687 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExadbVMClusterVM_Remove", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails _body; + + /// + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _exadbVMClusterName; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExadbVMClusterName { get => this._exadbVMClusterName; set => this._exadbVMClusterName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ExadbVMClusterName = this.ExadbVMClusterName; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersRemoveVms(SubscriptionId, ResourceGroupName, ExadbVMClusterName, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ExadbVMClusterName=ExadbVMClusterName,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_Remove() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded.cs new file mode 100644 index 000000000000..6110a5148c7a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.RemoveVirtualMachineFromExadbVMClusterDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed.", + SerializedName = @"dbNodes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[] DbNode { get => _body.DbNode ?? null /* arrayOf */; set => _body.DbNode = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Backing field for property. + private string _exadbVMClusterName; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ExadbVMClusterName { get => this._exadbVMClusterName; set => this._exadbVMClusterName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ExadbVMClusterName = this.ExadbVMClusterName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersRemoveVms(SubscriptionId, ResourceGroupName, ExadbVMClusterName, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ExadbVMClusterName=ExadbVMClusterName,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ExadbVMClusterName=ExadbVMClusterName, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity.cs new file mode 100644 index 000000000000..6956d0d73c05 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity.cs @@ -0,0 +1,502 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails _body; + + /// + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + /// + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database Service on Exascale Infrastructure only.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExadbVMClustersRemoveVmsViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExadbVMClustersRemoveVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded.cs new file mode 100644 index 000000000000..bc3c3de96026 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded.cs @@ -0,0 +1,506 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Remove VMs from the VM Cluster + /// + /// [OpenAPI] RemoveVms=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Remove VMs from the VM Cluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}/removeVms", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// Details of removing Virtual Machines from the Exadata VM cluster on Exascale Infrastructure. Applies to Exadata Database + /// Service on Exascale Infrastructure only. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRemoveVirtualMachineFromExadbVMClusterDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.RemoveVirtualMachineFromExadbVMClusterDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The list of ExaCS DB nodes for the Exadata VM cluster on Exascale Infrastructure to be removed.", + SerializedName = @"dbNodes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDbNodeDetails[] DbNode { get => _body.DbNode ?? null /* arrayOf */; set => _body.DbNode = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersRemoveVms' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExadbVMClustersRemoveVmsViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExadbVMClustersRemoveVms(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerExadbVMClusterVM_RemoveViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete.cs new file mode 100644 index 000000000000..7b876371c91b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete.cs @@ -0,0 +1,511 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a ExadbVmCluster + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExadbVMCluster_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExadbVMClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerExadbVMCluster_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity.cs new file mode 100644 index 000000000000..465b6ff01059 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a ExadbVmCluster + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExadbVMClustersDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExadbVMClustersDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerExadbVMCluster_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete.cs new file mode 100644 index 000000000000..3c34fb051c2d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete.cs @@ -0,0 +1,512 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a ExascaleDbStorageVault + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a ExascaleDbStorageVault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExascaleDbStorageVault + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExascaleDbStorageVault")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExascaleDbStorageVault", + SerializedName = @"exascaleDbStorageVaultName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExascaleDbStorageVaultName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbStorageVaultsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsDelete(SubscriptionId, ResourceGroupName, Name, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity.cs new file mode 100644 index 000000000000..70d6b25d8767 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity.cs @@ -0,0 +1,490 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a ExascaleDbStorageVault + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a ExascaleDbStorageVault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbStorageVaultsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExascaleDbStorageVaultsDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExascaleDbStorageVaultName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExascaleDbStorageVaultName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExascaleDbStorageVaultsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExascaleDbStorageVaultName ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerExascaleDbStorageVault_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete.cs new file mode 100644 index 000000000000..31f1f12de2bd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete.cs @@ -0,0 +1,481 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a OracleSubscription + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerOracleSubscription_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a OracleSubscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsDelete(SubscriptionId, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RemoveAzOracleDatabaseResourceManagerOracleSubscription_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity.cs new file mode 100644 index 000000000000..b0ab195a3666 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity.cs @@ -0,0 +1,482 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a OracleSubscription + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a OracleSubscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OracleSubscriptionsDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OracleSubscriptionsDelete(InputObject.SubscriptionId ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerOracleSubscription_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete.cs new file mode 100644 index 000000000000..f73d626fdf37 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete.cs @@ -0,0 +1,527 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a VirtualNetworkAddress + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a VirtualNetworkAddress")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _cloudvmclustername; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Cloudvmclustername { get => this._cloudvmclustername; set => this._cloudvmclustername = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// Virtual IP address hostname. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Virtual IP address hostname.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Virtual IP address hostname.", + SerializedName = @"virtualnetworkaddressname", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Virtualnetworkaddressname")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Cloudvmclustername = this.Cloudvmclustername; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'VirtualNetworkAddressesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.VirtualNetworkAddressesDelete(SubscriptionId, ResourceGroupName, Cloudvmclustername, Name, onNoContent, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Cloudvmclustername=Cloudvmclustername,Name=Name}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Cloudvmclustername=Cloudvmclustername, Name=Name }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity.cs new file mode 100644 index 000000000000..f95ca7aca132 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Delete a VirtualNetworkAddress + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Delete a VirtualNetworkAddress")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}/virtualNetworkAddresses/{virtualnetworkaddressname}", ApiVersion = "2025-03-01")] + public partial class RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// When specified, forces the cmdlet return a 'bool' given that there isn't a return type by default. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Returns true when the command succeeds")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter PassThru { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnNoContent will be called before the regular onNoContent has been processed, allowing customization of + /// what happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// /// Determines if the rest of the onNoContent method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnNoContent(global::System.Net.Http.HttpResponseMessage responseMessage, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity Clone() + { + var clone = new RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'VirtualNetworkAddressesDelete' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.VirtualNetworkAddressesDeleteViaIdentity(InputObject.Id, onNoContent, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Virtualnetworkaddressname) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Virtualnetworkaddressname"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.VirtualNetworkAddressesDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, InputObject.Virtualnetworkaddressname ?? null, onNoContent, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzOracleDatabaseResourceManagerVirtualNetworkAddress_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 204 (NoContent). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onNoContent(global::System.Net.Http.HttpResponseMessage responseMessage) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnNoContent(responseMessage, ref _returnNow); + // if overrideOnNoContent has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onNoContent - response for 204 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change.cs new file mode 100644 index 000000000000..2259e6ab3d22 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change.cs @@ -0,0 +1,520 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// [OpenAPI] ChangeDisasterRecoveryConfiguration=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Rename, @"AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration", ApiVersion = "2025-03-01")] + public partial class RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails _body; + + /// Configurations of a Disaster Recovery Details + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Configurations of a Disaster Recovery Details", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Configurations of a Disaster Recovery Details", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change Clone() + { + var clone = new RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesChangeDisasterRecoveryConfiguration' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesChangeDisasterRecoveryConfiguration(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_Change() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded.cs new file mode 100644 index 000000000000..b4a0588bf0d6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded.cs @@ -0,0 +1,568 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// [OpenAPI] ChangeDisasterRecoveryConfiguration=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Rename, @"AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration", ApiVersion = "2025-03-01")] + public partial class RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Configurations of a Disaster Recovery Details + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"disasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType DisasterRecoveryType { get => _body.DisasterRecoveryType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); set => _body.DisasterRecoveryType = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + SerializedName = @"isReplicateAutomaticBackups", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsReplicateAutomaticBackup { get => _body.IsReplicateAutomaticBackup ?? default(global::System.Management.Automation.SwitchParameter); set => _body.IsReplicateAutomaticBackup = value; } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.", + SerializedName = @"isSnapshotStandby", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsSnapshotStandby { get => _body.IsSnapshotStandby ?? default(global::System.Management.Automation.SwitchParameter); set => _body.IsSnapshotStandby = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.", + SerializedName = @"timeSnapshotStandbyEnabledTill", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime TimeSnapshotStandbyEnabledTill { get => _body.TimeSnapshotStandbyEnabledTill ?? default(global::System.DateTime); set => _body.TimeSnapshotStandbyEnabledTill = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded Clone() + { + var clone = new RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesChangeDisasterRecoveryConfiguration' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesChangeDisasterRecoveryConfiguration(SubscriptionId, ResourceGroupName, Autonomousdatabasename, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity.cs new file mode 100644 index 000000000000..15256d5266cc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// [OpenAPI] ChangeDisasterRecoveryConfiguration=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Rename, @"AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration", ApiVersion = "2025-03-01")] + public partial class RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails _body; + + /// Configurations of a Disaster Recovery Details + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Configurations of a Disaster Recovery Details", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Configurations of a Disaster Recovery Details", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity Clone() + { + var clone = new RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesChangeDisasterRecoveryConfiguration' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesChangeDisasterRecoveryConfigurationViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesChangeDisasterRecoveryConfiguration(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded.cs new file mode 100644 index 000000000000..dd3835862bac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded.cs @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database + /// + /// [OpenAPI] ChangeDisasterRecoveryConfiguration=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Rename, @"AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Perform ChangeDisasterRecoveryConfiguration action on Autonomous Database")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/changeDisasterRecoveryConfiguration", ApiVersion = "2025-03-01")] + public partial class RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Configurations of a Disaster Recovery Details + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDisasterRecoveryConfigurationDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.DisasterRecoveryConfigurationDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// + /// Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) + /// DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based + /// DR type provides lower cost DR with a slower RTO during failover or switchover. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the disaster recovery (DR) type of the Autonomous Database Serverless instance. Autonomous Data Guard (ADG) DR type provides business critical DR with a faster recovery time objective (RTO) during failover or switchover. Backup-based DR type provides lower cost DR with a slower RTO during failover or switchover.", + SerializedName = @"disasterRecoveryType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType DisasterRecoveryType { get => _body.DisasterRecoveryType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DisasterRecoveryType)""); set => _body.DisasterRecoveryType = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary + /// and Standby. If false, the backups taken on the Primary are not replicated to the Standby database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, 7 days worth of backups are replicated across regions for Cross-Region ADB or Backup-Based DR between Primary and Standby. If false, the backups taken on the Primary are not replicated to the Standby database.", + SerializedName = @"isReplicateAutomaticBackups", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsReplicateAutomaticBackup { get => _body.IsReplicateAutomaticBackup ?? default(global::System.Management.Automation.SwitchParameter); set => _body.IsReplicateAutomaticBackup = value; } + + /// + /// Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby + /// database. False would set a snapshot standby database back to regular standby database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if user wants to convert to a snapshot standby. For example, true would set a standby database to snapshot standby database. False would set a snapshot standby database back to regular standby database.", + SerializedName = @"isSnapshotStandby", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsSnapshotStandby { get => _body.IsSnapshotStandby ?? default(global::System.Management.Automation.SwitchParameter); set => _body.IsSnapshotStandby = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit + /// for the snapshot standby to be converted back to a cross-region standby database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time and date stored as an RFC 3339 formatted timestamp string. For example, 2022-01-01T12:00:00.000Z would set a limit for the snapshot standby to be converted back to a cross-region standby database.", + SerializedName = @"timeSnapshotStandbyEnabledTill", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime TimeSnapshotStandbyEnabledTill { get => _body.TimeSnapshotStandbyEnabledTill ?? default(global::System.DateTime); set => _body.TimeSnapshotStandbyEnabledTill = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded Clone() + { + var clone = new RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesChangeDisasterRecoveryConfiguration' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesChangeDisasterRecoveryConfigurationViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesChangeDisasterRecoveryConfiguration(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RenameAzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration_ChangeViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore.cs new file mode 100644 index 000000000000..cf9417376288 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore.cs @@ -0,0 +1,521 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleDatabaseResourceManagerAutonomousDatabase_Restore", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2025-03-01")] + public partial class RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails _body; + + /// Details to restore an Oracle Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Details to restore an Oracle Autonomous Database.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Details to restore an Oracle Autonomous Database.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore Clone() + { + var clone = new RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesRestore(SubscriptionId, ResourceGroupName, Name, Body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_Restore() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded.cs new file mode 100644 index 000000000000..7bb55ea57e6c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded.cs @@ -0,0 +1,522 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2025-03-01")] + public partial class RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Details to restore an Oracle Autonomous Database. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.RestoreAutonomousDatabaseDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// The time to restore the database to. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to restore the database to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The time to restore the database to.", + SerializedName = @"timestamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime Timestamp { get => _body.Timestamp; set => _body.Timestamp = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded Clone() + { + var clone = new RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesRestore(SubscriptionId, ResourceGroupName, Name, _body, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity.cs new file mode 100644 index 000000000000..463ff729189a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity.cs @@ -0,0 +1,499 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2025-03-01")] + public partial class RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails _body; + + /// Details to restore an Oracle Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Details to restore an Oracle Autonomous Database.", ValueFromPipeline = true)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Details to restore an Oracle Autonomous Database.", + SerializedName = @"body", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails Body { get => this._body; set => this._body = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity Clone() + { + var clone = new RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone.Body = this.Body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesRestoreViaIdentity(InputObject.Id, Body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesRestore(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, Body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=Body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded.cs new file mode 100644 index 000000000000..30eb5435158d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded.cs @@ -0,0 +1,500 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Restores an Autonomous Database based on the provided request parameters. + /// + /// [OpenAPI] Restore=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Restore, @"AzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Restores an Autonomous Database based on the provided request parameters.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/restore", ApiVersion = "2025-03-01")] + public partial class RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// Details to restore an Oracle Autonomous Database. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IRestoreAutonomousDatabaseDetails _body = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.RestoreAutonomousDatabaseDetails(); + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The time to restore the database to. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The time to restore the database to.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The time to restore the database to.", + SerializedName = @"timestamp", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime Timestamp { get => _body.Timestamp; set => _body.Timestamp = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded Clone() + { + var clone = new RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._body = this._body; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesRestore' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesRestoreViaIdentity(InputObject.Id, _body, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesRestore(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _body, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RestoreAzOracleDatabaseResourceManagerAutonomousDatabase_RestoreViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_body }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded.cs new file mode 100644 index 000000000000..6c2c57b922a8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded.cs @@ -0,0 +1,547 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a AutonomousDatabaseBackup + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// AutonomousDatabaseBackup resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupUpdate(); + + /// Backing field for property. + private string _adbbackupid; + + /// AutonomousDatabaseBackup id + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "AutonomousDatabaseBackup id")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"AutonomousDatabaseBackup id", + SerializedName = @"adbbackupid", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Adbbackupid { get => this._adbbackupid; set => this._adbbackupid = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Backing field for property. + private string _autonomousdatabasename; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Autonomousdatabasename { get => this._autonomousdatabasename; set => this._autonomousdatabasename = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the backup. The name does not have to be unique. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the backup. The name does not have to be unique.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Retention period, in days + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int RetentionPeriodInDay { get => _propertiesBody.RetentionPeriodInDay ?? default(int); set => _propertiesBody.RetentionPeriodInDay = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Autonomousdatabasename = this.Autonomousdatabasename; + clone.Adbbackupid = this.Adbbackupid; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabaseBackupsUpdate(SubscriptionId, ResourceGroupName, Autonomousdatabasename, Adbbackupid, _propertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Autonomousdatabasename=Autonomousdatabasename,Adbbackupid=Adbbackupid,body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Autonomousdatabasename=Autonomousdatabasename, Adbbackupid=Adbbackupid, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..87b5d4bad2d5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded.cs @@ -0,0 +1,515 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a AutonomousDatabaseBackup + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a AutonomousDatabaseBackup")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}/autonomousDatabaseBackups/{adbbackupid}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// AutonomousDatabaseBackup resource definition + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackupUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseBackupUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the backup. The name does not have to be unique. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the backup. The name does not have to be unique.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the backup. The name does not have to be unique.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Retention period, in days + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int RetentionPeriodInDay { get => _propertiesBody.RetentionPeriodInDay ?? default(int); set => _propertiesBody.RetentionPeriodInDay = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabaseBackupsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabaseBackupsUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Adbbackupid) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Adbbackupid"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabaseBackupsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, InputObject.Adbbackupid ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerAutonomousDatabaseBackup_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseBackup + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded.cs new file mode 100644 index 000000000000..d3384058a8e0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded.cs @@ -0,0 +1,865 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a AutonomousDatabase + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the AutonomousDatabase. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdate(); + + /// Admin password. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Admin password.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdminPassword { get => _propertiesBody.AdminPassword ?? null; set => _propertiesBody.AdminPassword = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance schedule type of the Autonomous Database Serverless.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType AutonomousMaintenanceScheduleType { get => _propertiesBody.AutonomousMaintenanceScheduleType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); set => _propertiesBody.AutonomousMaintenanceScheduleType = value; } + + /// Retention period, in days, for long-term backups + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for long-term backups")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int BackupRetentionPeriodInDay { get => _propertiesBody.BackupRetentionPeriodInDay ?? default(int); set => _propertiesBody.BackupRetentionPeriodInDay = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The compute amount (CPUs) available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute amount (CPUs) available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + public float ComputeCount { get => _propertiesBody.ComputeCount ?? default(float); set => _propertiesBody.ComputeCount = value; } + + /// The number of CPU cores to be made available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores to be made available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// Customer Contacts. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Customer Contacts.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact ?? null /* arrayOf */; set => _propertiesBody.CustomerContact = value; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size, in gigabytes, of the data volume that will be created and attached to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInGb { get => _propertiesBody.DataStorageSizeInGb ?? default(int); set => _propertiesBody.DataStorageSizeInGb = value; } + + /// The quantity of data in the database, in terabytes. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The quantity of data in the database, in terabytes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(int); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle Database Edition that applies to the Autonomous databases.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType DatabaseEdition { get => _propertiesBody.DatabaseEdition ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); set => _propertiesBody.DatabaseEdition = value; } + + /// Name of the day of the week. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the day of the week.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName DayOfWeekName { get => _propertiesBody.DayOfWeekName ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); set => _propertiesBody.DayOfWeekName = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database CPU core count.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingEnabled { get => _propertiesBody.IsAutoScalingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingEnabled = value; } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingForStorageEnabled { get => _propertiesBody.IsAutoScalingForStorageEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingForStorageEnabled = value; } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalDataGuardEnabled { get => _propertiesBody.IsLocalDataGuardEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsLocalDataGuardEnabled = value; } + + /// Specifies if the Autonomous Database requires mTLS connections. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database requires mTLS connections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsMtlsConnectionRequired { get => _propertiesBody.IsMtlsConnectionRequired ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsMtlsConnectionRequired = value; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseModel { get => _propertiesBody.LicenseModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); set => _propertiesBody.LicenseModel = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + public int LocalAdgAutoFailoverMaxDataLossLimit { get => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit ?? default(int); set => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter LongTermBackupScheduleIsDisabled { get => _propertiesBody.LongTermBackupScheduleIsDisabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.LongTermBackupScheduleIsDisabled = value; } + + /// The frequency of the long-term backup schedule + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The frequency of the long-term backup schedule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType LongTermBackupScheduleRepeatCadence { get => _propertiesBody.LongTermBackupScheduleRepeatCadence ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); set => _propertiesBody.LongTermBackupScheduleRepeatCadence = value; } + + /// Retention period, in days, for backups. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for backups.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int LongTermBackupScheduleRetentionPeriodInDay { get => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay ?? default(int); set => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay = value; } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime LongTermBackupScheduleTimeOfBackup { get => _propertiesBody.LongTermBackupScheduleTimeOfBackup ?? default(global::System.DateTime); set => _propertiesBody.LongTermBackupScheduleTimeOfBackup = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The database name. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The database name.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The database name.", + SerializedName = @"autonomousdatabasename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Autonomousdatabasename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Indicates the Autonomous Database mode. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the Autonomous Database mode.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType OpenMode { get => _propertiesBody.OpenMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); set => _propertiesBody.OpenMode = value; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _propertiesBody.PeerDbId ?? null; set => _propertiesBody.PeerDbId = value; } + + /// The Autonomous Database permission level. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Autonomous Database permission level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType PermissionLevel { get => _propertiesBody.PermissionLevel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); set => _propertiesBody.PermissionLevel = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType Role { get => _propertiesBody.Role ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); set => _propertiesBody.Role = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto start time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledOperationScheduledStartTime { get => _propertiesBody.ScheduledOperationScheduledStartTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStartTime = value; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto stop time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledOperationScheduledStopTime { get => _propertiesBody.ScheduledOperationScheduledStopTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStopTime = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// 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'] + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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']")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + public string[] WhitelistedIP { get => _propertiesBody.WhitelistedIP ?? null /* arrayOf */; set => _propertiesBody.WhitelistedIP = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.AutonomousDatabasesUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..909a70a8791e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded.cs @@ -0,0 +1,843 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a AutonomousDatabase + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a AutonomousDatabase")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/autonomousDatabases/{autonomousdatabasename}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the AutonomousDatabase. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.AutonomousDatabaseUpdate(); + + /// Admin password. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Admin password.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Admin password.", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(System.Security.SecureString) })] + public System.Security.SecureString AdminPassword { get => _propertiesBody.AdminPassword ?? null; set => _propertiesBody.AdminPassword = value; } + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// The maintenance schedule type of the Autonomous Database Serverless. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance schedule type of the Autonomous Database Serverless.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance schedule type of the Autonomous Database Serverless.", + SerializedName = @"autonomousMaintenanceScheduleType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType AutonomousMaintenanceScheduleType { get => _propertiesBody.AutonomousMaintenanceScheduleType ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.AutonomousMaintenanceScheduleType)""); set => _propertiesBody.AutonomousMaintenanceScheduleType = value; } + + /// Retention period, in days, for long-term backups + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for long-term backups")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for long-term backups", + SerializedName = @"backupRetentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int BackupRetentionPeriodInDay { get => _propertiesBody.BackupRetentionPeriodInDay ?? default(int); set => _propertiesBody.BackupRetentionPeriodInDay = value; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The compute amount (CPUs) available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The compute amount (CPUs) available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The compute amount (CPUs) available to the database.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(float) })] + public float ComputeCount { get => _propertiesBody.ComputeCount ?? default(float); set => _propertiesBody.ComputeCount = value; } + + /// The number of CPU cores to be made available to the database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores to be made available to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores to be made available to the database.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// Customer Contacts. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Customer Contacts.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Customer Contacts.", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact ?? null /* arrayOf */; set => _propertiesBody.CustomerContact = value; } + + /// + /// The size, in gigabytes, of the data volume that will be created and attached to the database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The size, in gigabytes, of the data volume that will be created and attached to the database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size, in gigabytes, of the data volume that will be created and attached to the database.", + SerializedName = @"dataStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInGb { get => _propertiesBody.DataStorageSizeInGb ?? default(int); set => _propertiesBody.DataStorageSizeInGb = value; } + + /// The quantity of data in the database, in terabytes. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The quantity of data in the database, in terabytes.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The quantity of data in the database, in terabytes.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(int) })] + public int DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(int); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The Oracle Database Edition that applies to the Autonomous databases. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle Database Edition that applies to the Autonomous databases.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle Database Edition that applies to the Autonomous databases.", + SerializedName = @"databaseEdition", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType DatabaseEdition { get => _propertiesBody.DatabaseEdition ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DatabaseEditionType)""); set => _propertiesBody.DatabaseEdition = value; } + + /// Name of the day of the week. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Name of the day of the week.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Name of the day of the week.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName DayOfWeekName { get => _propertiesBody.DayOfWeekName ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.DayOfWeekName)""); set => _propertiesBody.DayOfWeekName = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The user-friendly name for the Autonomous Database. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The user-friendly name for the Autonomous Database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The user-friendly name for the Autonomous Database.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database CPU core count.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database CPU core count.", + SerializedName = @"isAutoScalingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingEnabled { get => _propertiesBody.IsAutoScalingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingEnabled = value; } + + /// Indicates if auto scaling is enabled for the Autonomous Database storage. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if auto scaling is enabled for the Autonomous Database storage.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if auto scaling is enabled for the Autonomous Database storage.", + SerializedName = @"isAutoScalingForStorageEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsAutoScalingForStorageEnabled { get => _propertiesBody.IsAutoScalingForStorageEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsAutoScalingForStorageEnabled = value; } + + /// + /// Indicates whether the Autonomous Database has local or called in-region Data Guard enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether the Autonomous Database has local or called in-region Data Guard enabled.", + SerializedName = @"isLocalDataGuardEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsLocalDataGuardEnabled { get => _propertiesBody.IsLocalDataGuardEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsLocalDataGuardEnabled = value; } + + /// Specifies if the Autonomous Database requires mTLS connections. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Specifies if the Autonomous Database requires mTLS connections.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies if the Autonomous Database requires mTLS connections.", + SerializedName = @"isMtlsConnectionRequired", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter IsMtlsConnectionRequired { get => _propertiesBody.IsMtlsConnectionRequired ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.IsMtlsConnectionRequired = value; } + + /// + /// The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the Oracle Autonomous Database. The default is LICENSE_INCLUDED.", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseModel { get => _propertiesBody.LicenseModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); set => _propertiesBody.LicenseModel = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"localAdgAutoFailoverMaxDataLossLimit", + PossibleTypes = new [] { typeof(int) })] + public int LocalAdgAutoFailoverMaxDataLossLimit { get => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit ?? default(int); set => _propertiesBody.LocalAdgAutoFailoverMaxDataLossLimit = value; } + + /// + /// Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates if the long-term backup schedule should be deleted. The default value is `FALSE`.", + SerializedName = @"isDisabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter LongTermBackupScheduleIsDisabled { get => _propertiesBody.LongTermBackupScheduleIsDisabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.LongTermBackupScheduleIsDisabled = value; } + + /// The frequency of the long-term backup schedule + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The frequency of the long-term backup schedule")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The frequency of the long-term backup schedule", + SerializedName = @"repeatCadence", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType LongTermBackupScheduleRepeatCadence { get => _propertiesBody.LongTermBackupScheduleRepeatCadence ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RepeatCadenceType)""); set => _propertiesBody.LongTermBackupScheduleRepeatCadence = value; } + + /// Retention period, in days, for backups. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Retention period, in days, for backups.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Retention period, in days, for backups.", + SerializedName = @"retentionPeriodInDays", + PossibleTypes = new [] { typeof(int) })] + public int LongTermBackupScheduleRetentionPeriodInDay { get => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay ?? default(int); set => _propertiesBody.LongTermBackupScheduleRetentionPeriodInDay = value; } + + /// + /// The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date + /// will have the backup taken on the last day of that month. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp for the long-term backup schedule. For a MONTHLY cadence, months having fewer days than the provided date will have the backup taken on the last day of that month.", + SerializedName = @"timeOfBackup", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + public global::System.DateTime LongTermBackupScheduleTimeOfBackup { get => _propertiesBody.LongTermBackupScheduleTimeOfBackup ?? default(global::System.DateTime); set => _propertiesBody.LongTermBackupScheduleTimeOfBackup = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// Indicates the Autonomous Database mode. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates the Autonomous Database mode.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates the Autonomous Database mode.", + SerializedName = @"openMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType OpenMode { get => _propertiesBody.OpenMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.OpenModeType)""); set => _propertiesBody.OpenMode = value; } + + /// + /// The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current + /// peer database. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Azure resource ID of the Disaster Recovery peer database, which is located in a different region from the current peer database.", + SerializedName = @"peerDbId", + PossibleTypes = new [] { typeof(string) })] + public string PeerDbId { get => _propertiesBody.PeerDbId ?? null; set => _propertiesBody.PeerDbId = value; } + + /// The Autonomous Database permission level. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Autonomous Database permission level.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Autonomous Database permission level.", + SerializedName = @"permissionLevel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType PermissionLevel { get => _propertiesBody.PermissionLevel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PermissionLevelType)""); set => _propertiesBody.PermissionLevel = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Data Guard role of the Autonomous Container Database or Autonomous Database, if Autonomous Data Guard is enabled.", + SerializedName = @"role", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType Role { get => _propertiesBody.Role ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.RoleType)""); set => _propertiesBody.Role = value; } + + /// auto start time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto start time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto start time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStartTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledOperationScheduledStartTime { get => _propertiesBody.ScheduledOperationScheduledStartTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStartTime = value; } + + /// auto stop time. value must be of ISO-8601 format HH:mm + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "auto stop time. value must be of ISO-8601 format HH:mm")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"auto stop time. value must be of ISO-8601 format HH:mm", + SerializedName = @"scheduledStopTime", + PossibleTypes = new [] { typeof(string) })] + public string ScheduledOperationScheduledStopTime { get => _propertiesBody.ScheduledOperationScheduledStopTime ?? null; set => _propertiesBody.ScheduledOperationScheduledStopTime = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabaseUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// 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'] + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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']")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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']", + SerializedName = @"whitelistedIps", + PossibleTypes = new [] { typeof(string) })] + public string[] WhitelistedIP { get => _propertiesBody.WhitelistedIP ?? null /* arrayOf */; set => _propertiesBody.WhitelistedIP = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'AutonomousDatabasesUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.AutonomousDatabasesUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Autonomousdatabasename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Autonomousdatabasename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.AutonomousDatabasesUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Autonomousdatabasename ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerAutonomousDatabase_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IAutonomousDatabase + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded.cs new file mode 100644 index 000000000000..8b297e21bae9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded.cs @@ -0,0 +1,721 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a CloudExadataInfrastructure + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the CloudExadataInfrastructure. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The number of compute servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of compute servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + public int ComputeCount { get => _propertiesBody.ComputeCount ?? default(int); set => _propertiesBody.ComputeCount = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact ?? null /* arrayOf */; set => _propertiesBody.CustomerContact = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The name for the Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name for the Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// 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). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowCustomActionTimeoutInMin { get => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin ?? default(int); set => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin = value; } + + /// Days during the week when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Days during the week when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => _propertiesBody.MaintenanceWindowDaysOfWeek ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowDaysOfWeek = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowHoursOfDay { get => _propertiesBody.MaintenanceWindowHoursOfDay ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowHoursOfDay = value; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsCustomActionTimeoutEnabled { get => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled = value; } + + /// is Monthly Patching Enabled + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "is Monthly Patching Enabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsMonthlyPatchingEnabled { get => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowLeadTimeInWeek { get => _propertiesBody.MaintenanceWindowLeadTimeInWeek ?? default(int); set => _propertiesBody.MaintenanceWindowLeadTimeInWeek = value; } + + /// Months during the year when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Months during the year when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get => _propertiesBody.MaintenanceWindowMonth ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowMonth = value; } + + /// Cloud Exadata infrastructure node patching method. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata infrastructure node patching method.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode MaintenanceWindowPatchingMode { get => _propertiesBody.MaintenanceWindowPatchingMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode)""); set => _propertiesBody.MaintenanceWindowPatchingMode = value; } + + /// The maintenance window scheduling preference. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance window scheduling preference.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference MaintenanceWindowPreference { get => _propertiesBody.MaintenanceWindowPreference ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference)""); set => _propertiesBody.MaintenanceWindowPreference = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowWeeksOfMonth { get => _propertiesBody.MaintenanceWindowWeeksOfMonth ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowWeeksOfMonth = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudExadataInfrastructure name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudExadataInfrastructure name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudExadataInfrastructure name", + SerializedName = @"cloudexadatainfrastructurename", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudexadatainfrastructurename")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of storage servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + public int StorageCount { get => _propertiesBody.StorageCount ?? default(int); set => _propertiesBody.StorageCount = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// CloudExadataInfrastructure zones + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CloudExadataInfrastructure zones")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _propertiesBody.Zone ?? null /* arrayOf */; set => _propertiesBody.Zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudExadataInfrastructuresUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..7b466ff9516f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded.cs @@ -0,0 +1,699 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a CloudExadataInfrastructure + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a CloudExadataInfrastructure")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudExadataInfrastructures/{cloudexadatainfrastructurename}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the CloudExadataInfrastructure. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudExadataInfrastructureUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The number of compute servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of compute servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of compute servers for the cloud Exadata infrastructure.", + SerializedName = @"computeCount", + PossibleTypes = new [] { typeof(int) })] + public int ComputeCount { get => _propertiesBody.ComputeCount ?? default(int); set => _propertiesBody.ComputeCount = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"customerContacts", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICustomerContact[] CustomerContact { get => _propertiesBody.CustomerContact ?? null /* arrayOf */; set => _propertiesBody.CustomerContact = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// The name for the Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The name for the Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name for the Exadata infrastructure.", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// 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). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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).", + SerializedName = @"customActionTimeoutInMins", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowCustomActionTimeoutInMin { get => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin ?? default(int); set => _propertiesBody.MaintenanceWindowCustomActionTimeoutInMin = value; } + + /// Days during the week when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Days during the week when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Days during the week when maintenance should be performed.", + SerializedName = @"daysOfWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IDayOfWeek[] MaintenanceWindowDaysOfWeek { get => _propertiesBody.MaintenanceWindowDaysOfWeek ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowDaysOfWeek = value; } + + /// + /// 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 + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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", + SerializedName = @"hoursOfDay", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowHoursOfDay { get => _propertiesBody.MaintenanceWindowHoursOfDay ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowHoursOfDay = value; } + + /// + /// If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If true, enables the configuration of a custom action timeout (waiting period) between database server patching operations.", + SerializedName = @"isCustomActionTimeoutEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsCustomActionTimeoutEnabled { get => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsCustomActionTimeoutEnabled = value; } + + /// is Monthly Patching Enabled + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "is Monthly Patching Enabled")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"is Monthly Patching Enabled", + SerializedName = @"isMonthlyPatchingEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter MaintenanceWindowIsMonthlyPatchingEnabled { get => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.MaintenanceWindowIsMonthlyPatchingEnabled = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"leadTimeInWeeks", + PossibleTypes = new [] { typeof(int) })] + public int MaintenanceWindowLeadTimeInWeek { get => _propertiesBody.MaintenanceWindowLeadTimeInWeek ?? default(int); set => _propertiesBody.MaintenanceWindowLeadTimeInWeek = value; } + + /// Months during the year when maintenance should be performed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Months during the year when maintenance should be performed.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Months during the year when maintenance should be performed.", + SerializedName = @"months", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IMonth[] MaintenanceWindowMonth { get => _propertiesBody.MaintenanceWindowMonth ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowMonth = value; } + + /// Cloud Exadata infrastructure node patching method. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Cloud Exadata infrastructure node patching method.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Cloud Exadata infrastructure node patching method.", + SerializedName = @"patchingMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode MaintenanceWindowPatchingMode { get => _propertiesBody.MaintenanceWindowPatchingMode ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.PatchingMode)""); set => _propertiesBody.MaintenanceWindowPatchingMode = value; } + + /// The maintenance window scheduling preference. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The maintenance window scheduling preference.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maintenance window scheduling preference.", + SerializedName = @"preference", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference MaintenanceWindowPreference { get => _propertiesBody.MaintenanceWindowPreference ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Preference)""); set => _propertiesBody.MaintenanceWindowPreference = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"weeksOfMonth", + PossibleTypes = new [] { typeof(int) })] + public int[] MaintenanceWindowWeeksOfMonth { get => _propertiesBody.MaintenanceWindowWeeksOfMonth ?? null /* arrayOf */; set => _propertiesBody.MaintenanceWindowWeeksOfMonth = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// The number of storage servers for the cloud Exadata infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of storage servers for the cloud Exadata infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of storage servers for the cloud Exadata infrastructure.", + SerializedName = @"storageCount", + PossibleTypes = new [] { typeof(int) })] + public int StorageCount { get => _propertiesBody.StorageCount ?? default(int); set => _propertiesBody.StorageCount = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructureUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// CloudExadataInfrastructure zones + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "CloudExadataInfrastructure zones")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"CloudExadataInfrastructure zones", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _propertiesBody.Zone ?? null /* arrayOf */; set => _propertiesBody.Zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudExadataInfrastructuresUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudExadataInfrastructuresUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudexadatainfrastructurename) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudexadatainfrastructurename"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudExadataInfrastructuresUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudexadatainfrastructurename ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerCloudExadataInfrastructure_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudExadataInfrastructure + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded.cs new file mode 100644 index 000000000000..1dfea151d36f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded.cs @@ -0,0 +1,693 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a CloudVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the CloudVmCluster. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The list of compute servers to be added to the cloud VM cluster. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of compute servers to be added to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + public string[] ComputeNode { get => _propertiesBody.ComputeNode ?? null /* arrayOf */; set => _propertiesBody.ComputeNode = value; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores enabled on the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsDiagnosticsEventsEnabled { get => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled = value; } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsHealthMonitoringEnabled { get => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled = value; } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsIncidentLogsEnabled { get => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled = value; } + + /// The data disk group size to be allocated in TBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in TBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + public double DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(double); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The local node storage to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The local node storage to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DbNodeStorageSizeInGb { get => _propertiesBody.DbNodeStorageSizeInGb ?? default(int); set => _propertiesBody.DbNodeStorageSizeInGb = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Display Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Display Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Array of mount path and size. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of mount path and size.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of mount path and size.", + SerializedName = @"fileSystemConfigurationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get => _propertiesBody.FileSystemConfigurationDetail ?? null /* arrayOf */; set => _propertiesBody.FileSystemConfigurationDetail = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseModel { get => _propertiesBody.LicenseModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); set => _propertiesBody.LicenseModel = value; } + + /// The memory to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The memory to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int MemorySizeInGb { get => _propertiesBody.MemorySizeInGb ?? default(int); set => _propertiesBody.MemorySizeInGb = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// CloudVmCluster name + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "CloudVmCluster name")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"CloudVmCluster name", + SerializedName = @"cloudvmclustername", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("Cloudvmclustername")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + public float OcpuCount { get => _propertiesBody.OcpuCount ?? default(float); set => _propertiesBody.OcpuCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + public string[] SshPublicKey { get => _propertiesBody.SshPublicKey ?? null /* arrayOf */; set => _propertiesBody.SshPublicKey = value; } + + /// The data disk group size to be allocated in GBs per VM. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in GBs per VM.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int StorageSizeInGb { get => _propertiesBody.StorageSizeInGb ?? default(int); set => _propertiesBody.StorageSizeInGb = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.CloudVMClustersUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..6f38260009a5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded.cs @@ -0,0 +1,671 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a CloudVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a CloudVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/cloudVmClusters/{cloudvmclustername}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the CloudVmCluster. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.CloudVMClusterUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// The list of compute servers to be added to the cloud VM cluster. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The list of compute servers to be added to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of compute servers to be added to the cloud VM cluster.", + SerializedName = @"computeNodes", + PossibleTypes = new [] { typeof(string) })] + public string[] ComputeNode { get => _propertiesBody.ComputeNode ?? null /* arrayOf */; set => _propertiesBody.ComputeNode = value; } + + /// The number of CPU cores enabled on the cloud VM cluster. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of CPU cores enabled on the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of CPU cores enabled on the cloud VM cluster.", + SerializedName = @"cpuCoreCount", + PossibleTypes = new [] { typeof(int) })] + public int CpuCoreCount { get => _propertiesBody.CpuCoreCount ?? default(int); set => _propertiesBody.CpuCoreCount = value; } + + /// + /// Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS.", + SerializedName = @"isDiagnosticsEventsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsDiagnosticsEventsEnabled { get => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsDiagnosticsEventsEnabled = value; } + + /// + /// Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isHealthMonitoringEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsHealthMonitoringEnabled { get => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsHealthMonitoringEnabled = value; } + + /// + /// Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS.", + SerializedName = @"isIncidentLogsEnabled", + PossibleTypes = new [] { typeof(global::System.Management.Automation.SwitchParameter) })] + public global::System.Management.Automation.SwitchParameter DataCollectionOptionIsIncidentLogsEnabled { get => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled ?? default(global::System.Management.Automation.SwitchParameter); set => _propertiesBody.DataCollectionOptionIsIncidentLogsEnabled = value; } + + /// The data disk group size to be allocated in TBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in TBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in TBs.", + SerializedName = @"dataStorageSizeInTbs", + PossibleTypes = new [] { typeof(double) })] + public double DataStorageSizeInTb { get => _propertiesBody.DataStorageSizeInTb ?? default(double); set => _propertiesBody.DataStorageSizeInTb = value; } + + /// The local node storage to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The local node storage to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The local node storage to be allocated in GBs.", + SerializedName = @"dbNodeStorageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int DbNodeStorageSizeInGb { get => _propertiesBody.DbNodeStorageSizeInGb ?? default(int); set => _propertiesBody.DbNodeStorageSizeInGb = value; } + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// Display Name + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Display Name")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Display Name", + SerializedName = @"displayName", + PossibleTypes = new [] { typeof(string) })] + public string DisplayName { get => _propertiesBody.DisplayName ?? null; set => _propertiesBody.DisplayName = value; } + + /// Array of mount path and size. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of mount path and size.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Array of mount path and size.", + SerializedName = @"fileSystemConfigurationDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IFileSystemConfigurationDetails[] FileSystemConfigurationDetail { get => _propertiesBody.FileSystemConfigurationDetail ?? null /* arrayOf */; set => _propertiesBody.FileSystemConfigurationDetail = value; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Oracle license model that applies to the cloud VM cluster. The default is LICENSE_INCLUDED. ", + SerializedName = @"licenseModel", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel LicenseModel { get => _propertiesBody.LicenseModel ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.LicenseModel)""); set => _propertiesBody.LicenseModel = value; } + + /// The memory to be allocated in GBs. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The memory to be allocated in GBs.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The memory to be allocated in GBs.", + SerializedName = @"memorySizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int MemorySizeInGb { get => _propertiesBody.MemorySizeInGb ?? default(int); set => _propertiesBody.MemorySizeInGb = value; } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of OCPU cores to enable on the cloud VM cluster. Only 1 decimal place is allowed for the fractional part.", + SerializedName = @"ocpuCount", + PossibleTypes = new [] { typeof(float) })] + public float OcpuCount { get => _propertiesBody.OcpuCount ?? default(float); set => _propertiesBody.OcpuCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// The public key portion of one or more key pairs used for SSH access to the cloud VM cluster. + /// + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The public key portion of one or more key pairs used for SSH access to the cloud VM cluster.", + SerializedName = @"sshPublicKeys", + PossibleTypes = new [] { typeof(string) })] + public string[] SshPublicKey { get => _propertiesBody.SshPublicKey ?? null /* arrayOf */; set => _propertiesBody.SshPublicKey = value; } + + /// The data disk group size to be allocated in GBs per VM. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The data disk group size to be allocated in GBs per VM.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The data disk group size to be allocated in GBs per VM.", + SerializedName = @"storageSizeInGbs", + PossibleTypes = new [] { typeof(int) })] + public int StorageSizeInGb { get => _propertiesBody.StorageSizeInGb ?? default(int); set => _propertiesBody.StorageSizeInGb = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMClusterUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'CloudVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.CloudVMClustersUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.Cloudvmclustername) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Cloudvmclustername"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.CloudVMClustersUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Cloudvmclustername ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerCloudVMCluster_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ICloudVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded.cs new file mode 100644 index 000000000000..60c6ed857c3e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded.cs @@ -0,0 +1,546 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a ExadbVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the ExadbVmCluster. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExadbVmCluster + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExadbVmCluster")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExadbVmCluster", + SerializedName = @"exadbVmClusterName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExadbVMClusterName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of nodes in the Exadata VM cluster on Exascale Infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + public int NodeCount { get => _propertiesBody.NodeCount ?? default(int); set => _propertiesBody.NodeCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// The availability zones. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The availability zones.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability zones.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _propertiesBody.Zone ?? null /* arrayOf */; set => _propertiesBody.Zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExadbVMClustersUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..5d29cc2900b8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded.cs @@ -0,0 +1,524 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a ExadbVmCluster + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a ExadbVmCluster")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exadbVmClusters/{exadbVmClusterName}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the ExadbVmCluster. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExadbVMClusterUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// The number of nodes in the Exadata VM cluster on Exascale Infrastructure. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The number of nodes in the Exadata VM cluster on Exascale Infrastructure.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The number of nodes in the Exadata VM cluster on Exascale Infrastructure.", + SerializedName = @"nodeCount", + PossibleTypes = new [] { typeof(int) })] + public int NodeCount { get => _propertiesBody.NodeCount ?? default(int); set => _propertiesBody.NodeCount = value; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMClusterUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// The availability zones. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The availability zones.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The availability zones.", + SerializedName = @"zones", + PossibleTypes = new [] { typeof(string) })] + public string[] Zone { get => _propertiesBody.Zone ?? null /* arrayOf */; set => _propertiesBody.Zone = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExadbVMClustersUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExadbVMClustersUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExadbVMClusterName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExadbVMClusterName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExadbVMClustersUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExadbVMClusterName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerExadbVMCluster_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExadbVMCluster + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded.cs new file mode 100644 index 000000000000..593f1825bc18 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded.cs @@ -0,0 +1,523 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a ExascaleDbStorageVault + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a ExascaleDbStorageVault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for updating tags in ExascaleDbStorageVault resources. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// Backing field for property. + private string _name; + + /// The name of the ExascaleDbStorageVault + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the ExascaleDbStorageVault")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the ExascaleDbStorageVault", + SerializedName = @"exascaleDbStorageVaultName", + PossibleTypes = new [] { typeof(string) })] + [global::System.Management.Automation.Alias("ExascaleDbStorageVaultName")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string Name { get => this._name; set => this._name = value; } + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _resourceGroupName; + + /// The name of the resource group. The name is case insensitive. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group. The name is case insensitive.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the resource group. The name is case insensitive.", + SerializedName = @"resourceGroupName", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.Name = this.Name; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbStorageVaultsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.ExascaleDbStorageVaultsUpdate(SubscriptionId, ResourceGroupName, Name, _propertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,Name=Name,body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..1996a0dbc2d8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded.cs @@ -0,0 +1,501 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a ExascaleDbStorageVault + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a ExascaleDbStorageVault")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Oracle.Database/exascaleDbStorageVaults/{exascaleDbStorageVaultName}", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for updating tags in ExascaleDbStorageVault resources. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.ExascaleDbStorageVaultTagsUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVaultTagsUpdateTags Tag { get => _propertiesBody.Tag ?? null /* object */; set => _propertiesBody.Tag = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'ExascaleDbStorageVaultsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.ExascaleDbStorageVaultsUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ResourceGroupName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ResourceGroupName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + if (null == InputObject.ExascaleDbStorageVaultName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ExascaleDbStorageVaultName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ExascaleDbStorageVaultsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ExascaleDbStorageVaultName ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerExascaleDbStorageVault_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IExascaleDbStorageVault + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded.cs new file mode 100644 index 000000000000..6fce62b4d34d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded.cs @@ -0,0 +1,563 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a OracleSubscription + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a OracleSubscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the OracleSubscription. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Intent for the update operation + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Intent for the update operation")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent Intent { get => _propertiesBody.Intent ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent)""); set => _propertiesBody.Intent = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// A user defined name of the 3rd Party Artifact that is being procured. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A user defined name of the 3rd Party Artifact that is being procured.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string PlanName { get => _propertiesBody.PlanName ?? null; set => _propertiesBody.PlanName = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + public string PlanProduct { get => _propertiesBody.PlanProduct ?? null; set => _propertiesBody.PlanProduct = value; } + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + public string PlanPromotionCode { get => _propertiesBody.PlanPromotionCode ?? null; set => _propertiesBody.PlanPromotionCode = value; } + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + public string PlanPublisher { get => _propertiesBody.PlanPublisher ?? null; set => _propertiesBody.PlanPublisher = value; } + + /// The version of the desired product/artifact. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The version of the desired product/artifact.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + public string PlanVersion { get => _propertiesBody.PlanVersion ?? null; set => _propertiesBody.PlanVersion = value; } + + /// Product code for the term unit + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Product code for the term unit")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + public string ProductCode { get => _propertiesBody.ProductCode ?? null; set => _propertiesBody.ProductCode = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// Backing field for property. + private string _subscriptionId; + + /// The ID of the target subscription. The value must be an UUID. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription. The value must be an UUID.")] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription. The value must be an UUID.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + clone.SubscriptionId = this.SubscriptionId; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + await this.Client.OracleSubscriptionsUpdate(SubscriptionId, _propertiesBody, onOk, onDefault, this, Pipeline); + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the + /// cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId, body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded.cs b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded.cs new file mode 100644 index 000000000000..0f7b7258edea --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/cmdlets/UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded.cs @@ -0,0 +1,564 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + using System; + + /// Update a OracleSubscription + /// + /// [OpenAPI] Update=>PATCH:"/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsData.Update, @"AzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription))] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Description(@"Update a OracleSubscription")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Generated] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Oracle.Database/oracleSubscriptions/default", ApiVersion = "2025-03-01")] + public partial class UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener + { + /// A unique id generatd for the this cmdlet when it is instantiated. + private string __correlationId = System.Guid.NewGuid().ToString(); + + /// A copy of the Invocation Info (necessary to allow asJob to clone this cmdlet) + private global::System.Management.Automation.InvocationInfo __invocationInfo; + + /// A unique id generatd for the this cmdlet when ProcessRecord() is called. + private string __processRecordId; + + /// + /// The for this operation. + /// + private global::System.Threading.CancellationTokenSource _cancellationTokenSource = new global::System.Threading.CancellationTokenSource(); + + /// The type used for update operations of the OracleSubscription. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscriptionUpdate _propertiesBody = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.OracleSubscriptionUpdate(); + + /// when specified, runs this cmdlet as a PowerShell job + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command as a job")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter AsJob { get; set; } + + /// Wait for .NET debugger to attach + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Wait for .NET debugger to attach")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter Break { get; set; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.OracleDatabaseResourceManager Client => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.ClientAPI; + + /// + /// The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet + /// against a different subscription + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.")] + [global::System.Management.Automation.ValidateNotNull] + [global::System.Management.Automation.Alias("AzureRMContext", "AzureCredential")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Azure)] + public global::System.Management.Automation.PSObject DefaultProfile { get; set; } + + /// SendAsync Pipeline Steps to be appended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be appended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelineAppend { get; set; } + + /// SendAsync Pipeline Steps to be prepended to the front of the pipeline + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "SendAsync Pipeline Steps to be prepended to the front of the pipeline")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity _inputObject; + + /// Identity Parameter + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Identity Parameter", ValueFromPipeline = true)] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Path)] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.IOracleDatabaseResourceManagerIdentity InputObject { get => this._inputObject; set => this._inputObject = value; } + + /// Intent for the update operation + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Intent for the update operation")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Intent for the update operation", + SerializedName = @"intent", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent))] + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent Intent { get => _propertiesBody.Intent ?? ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support.Intent)""); set => _propertiesBody.Intent = value; } + + /// Accessor for our copy of the InvocationInfo. + public global::System.Management.Automation.InvocationInfo InvocationInformation { get => __invocationInfo = __invocationInfo ?? this.MyInvocation ; set { __invocationInfo = value; } } + + /// + /// cancellation delegate. Stops the cmdlet when called. + /// + global::System.Action Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Cancel => _cancellationTokenSource.Cancel; + + /// cancellation token. + global::System.Threading.CancellationToken Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Token => _cancellationTokenSource.Token; + + /// + /// when specified, will make the remote call, and return an AsyncOperationResponse, letting the remote operation continue + /// asynchronously. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Run the command asynchronously")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter NoWait { get; set; } + + /// + /// The instance of the that the remote call will use. + /// + private Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.HttpPipeline Pipeline { get; set; } + + /// A user defined name of the 3rd Party Artifact that is being procured. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A user defined name of the 3rd Party Artifact that is being procured.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A user defined name of the 3rd Party Artifact that is being procured.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + public string PlanName { get => _propertiesBody.PlanName ?? null; set => _propertiesBody.PlanName = value; } + + /// + /// 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. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "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. ")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. ", + SerializedName = @"product", + PossibleTypes = new [] { typeof(string) })] + public string PlanProduct { get => _propertiesBody.PlanProduct ?? null; set => _propertiesBody.PlanProduct = value; } + + /// + /// A publisher provided promotion code as provisioned in Data Market for the said product/artifact. + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A publisher provided promotion code as provisioned in Data Market for the said product/artifact.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A publisher provided promotion code as provisioned in Data Market for the said product/artifact.", + SerializedName = @"promotionCode", + PossibleTypes = new [] { typeof(string) })] + public string PlanPromotionCode { get => _propertiesBody.PlanPromotionCode ?? null; set => _propertiesBody.PlanPromotionCode = value; } + + /// The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The publisher of the 3rd Party Artifact that is being bought. E.g. NewRelic", + SerializedName = @"publisher", + PossibleTypes = new [] { typeof(string) })] + public string PlanPublisher { get => _propertiesBody.PlanPublisher ?? null; set => _propertiesBody.PlanPublisher = value; } + + /// The version of the desired product/artifact. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The version of the desired product/artifact.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The version of the desired product/artifact.", + SerializedName = @"version", + PossibleTypes = new [] { typeof(string) })] + public string PlanVersion { get => _propertiesBody.PlanVersion ?? null; set => _propertiesBody.PlanVersion = value; } + + /// Product code for the term unit + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Product code for the term unit")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Product code for the term unit", + SerializedName = @"productCode", + PossibleTypes = new [] { typeof(string) })] + public string ProductCode { get => _propertiesBody.ProductCode ?? null; set => _propertiesBody.ProductCode = value; } + + /// The URI for the proxy server to use + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "The URI for the proxy server to use")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Uri Proxy { get; set; } + + /// Credentials for a proxy server to use for the remote call + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Credentials for a proxy server to use for the remote call")] + [global::System.Management.Automation.ValidateNotNull] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.PSCredential ProxyCredential { get; set; } + + /// Use the default credentials for the proxy + [global::System.Management.Automation.Parameter(Mandatory = false, DontShow = true, HelpMessage = "Use the default credentials for the proxy")] + [global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category(global::Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.ParameterCategory.Runtime)] + public global::System.Management.Automation.SwitchParameter ProxyUseDefaultCredentials { get; set; } + + /// + /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what + /// happens on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// /// Determines if the rest of the onDefault method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// overrideOnOk will be called before the regular onOk has been processed, allowing customization of what happens + /// on that response. Implement this method in a partial class to enable this behavior + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// /// Determines if the rest of the onOk method should be processed, or if the method should return + /// immediately (set to true to skip further processing ) + + partial void overrideOnOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response, ref global::System.Threading.Tasks.Task returnNow); + + /// + /// (overrides the default BeginProcessing method in global::System.Management.Automation.PSCmdlet) + /// + protected override void BeginProcessing() + { + var telemetryId = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryId.Invoke(); + if (telemetryId != "" && telemetryId != "internal") + { + __correlationId = telemetryId; + } + Module.Instance.SetProxyConfiguration(Proxy, ProxyCredential, ProxyUseDefaultCredentials); + if (Break) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.AttachDebugger.Break(); + } + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeginProcessing).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + + /// Creates a duplicate instance of this cmdlet (via JSON serialization). + /// + /// a duplicate instance of UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded + /// + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Cmdlets.UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded Clone() + { + var clone = new UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded(); + clone.__correlationId = this.__correlationId; + clone.__processRecordId = this.__processRecordId; + clone.DefaultProfile = this.DefaultProfile; + clone.InvocationInformation = this.InvocationInformation; + clone.Proxy = this.Proxy; + clone.Pipeline = this.Pipeline; + clone.AsJob = this.AsJob; + clone.Break = this.Break; + clone.ProxyCredential = this.ProxyCredential; + clone.ProxyUseDefaultCredentials = this.ProxyUseDefaultCredentials; + clone.HttpPipelinePrepend = this.HttpPipelinePrepend; + clone.HttpPipelineAppend = this.HttpPipelineAppend; + clone._propertiesBody = this._propertiesBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + var telemetryInfo = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.GetTelemetryInfo?.Invoke(__correlationId); + if (telemetryInfo != null) + { + telemetryInfo.TryGetValue("ShowSecretsWarning", out var showSecretsWarning); + telemetryInfo.TryGetValue("SanitizedProperties", out var sanitizedProperties); + telemetryInfo.TryGetValue("InvocationName", out var invocationName); + if (showSecretsWarning == "true") + { + if (string.IsNullOrEmpty(sanitizedProperties)) + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing secrets. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + else + { + WriteWarning($"The output of cmdlet {invocationName} may compromise security by showing the following secrets: {sanitizedProperties}. Learn more at https://go.microsoft.com/fwlink/?linkid=2258844"); + } + } + } + } + + /// Handles/Dispatches events during the call to the REST service. + /// The message id + /// The message cancellation token. When this call is cancelled, this should be true + /// Detailed message data for the message event. + /// + /// A that will be complete when handling of the message is completed. + /// + async global::System.Threading.Tasks.Task Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener.Signal(string id, global::System.Threading.CancellationToken token, global::System.Func messageData) + { + using( NoSynchronizationContext ) + { + if (token.IsCancellationRequested) + { + return ; + } + + switch ( id ) + { + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Verbose: + { + WriteVerbose($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Warning: + { + WriteWarning($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Information: + { + // When an operation supports asjob, Information messages must go thru verbose. + WriteVerbose($"INFORMATION: {(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Debug: + { + WriteDebug($"{(messageData().Message ?? global::System.String.Empty)}"); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.Error: + { + WriteError(new global::System.Management.Automation.ErrorRecord( new global::System.Exception(messageData().Message), string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null ) ); + return ; + } + case Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + if (data.ResponseMessage is System.Net.Http.HttpResponseMessage response) + { + var asyncOperation = response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = response.GetFirstHeader(@"Location"); + var uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? response.RequestMessage.RequestUri.AbsoluteUri : location : asyncOperation; + WriteObject(new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncOperationResponse { Target = uri }); + // do nothing more. + data.Cancel(); + return; + } + } + break; + } + } + await Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.Signal(id, token, messageData, (i,t,m) => ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(i,t,()=> Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventDataConverter.ConvertFrom( m() ) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.EventData ), InvocationInformation, this.ParameterSetName, __correlationId, __processRecordId, null ); + if (token.IsCancellationRequested) + { + return ; + } + WriteDebug($"{id}: {(messageData().Message ?? global::System.String.Empty)}"); + } + } + + /// Performs execution of the command. + protected override void ProcessRecord() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordStart).Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + __processRecordId = System.Guid.NewGuid().ToString(); + try + { + // work + if (ShouldProcess($"Call remote 'OracleSubscriptionsUpdate' operation")) + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("AsJob")) + { + var instance = this.Clone(); + var job = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncJob(instance, this.MyInvocation.Line, this.MyInvocation.MyCommand.Name, this._cancellationTokenSource.Token, this._cancellationTokenSource.Cancel); + JobRepository.Add(job); + var task = instance.ProcessRecordAsync(); + job.Monitor(task); + WriteObject(job); + } + else + { + using( var asyncCommandRuntime = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.AsyncCommandRuntime(this, ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token) ) + { + asyncCommandRuntime.Wait( ProcessRecordAsync(),((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token); + } + } + } + } + catch (global::System.AggregateException aggregateException) + { + // unroll the inner exceptions to get the root cause + foreach( var innerException in aggregateException.Flatten().InnerExceptions ) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{innerException.GetType().Name} - {innerException.Message} : {innerException.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(innerException,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + } + catch (global::System.Exception exception) when ((exception as System.Management.Automation.PipelineStoppedException)== null || (exception as System.Management.Automation.PipelineStoppedException).InnerException != null) + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletException, $"{exception.GetType().Name} - {exception.Message} : {exception.StackTrace}").Wait(); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + // Write exception out to error channel. + WriteError( new global::System.Management.Automation.ErrorRecord(exception,string.Empty, global::System.Management.Automation.ErrorCategory.NotSpecified, null) ); + } + finally + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordEnd).Wait(); + } + } + + /// Performs execution of the command, working asynchronously if required. + /// + /// A that will be complete when handling of the method is completed. + /// + protected async global::System.Threading.Tasks.Task ProcessRecordAsync() + { + using( NoSynchronizationContext ) + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletGetPipeline); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + Pipeline = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.CreatePipeline(InvocationInformation, __correlationId, __processRecordId, this.ParameterSetName); + if (null != HttpPipelinePrepend) + { + Pipeline.Prepend((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelinePrepend) ?? HttpPipelinePrepend); + } + if (null != HttpPipelineAppend) + { + Pipeline.Append((this.CommandRuntime as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.IAsyncCommandRuntimeExtensions)?.Wrap(HttpPipelineAppend) ?? HttpPipelineAppend); + } + // get the client instance + try + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (InputObject?.Id != null) + { + await this.Client.OracleSubscriptionsUpdateViaIdentity(InputObject.Id, _propertiesBody, onOk, onDefault, this, Pipeline); + } + else + { + // try to call with PATH parameters from Input Object + if (null == InputObject.SubscriptionId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.SubscriptionId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.OracleSubscriptionsUpdate(InputObject.SubscriptionId ?? null, _propertiesBody, onOk, onDefault, this, Pipeline); + } + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + } + catch (Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.UndeclaredResponseException urexception) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody}) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(urexception.Message) { RecommendedAction = urexception.Action } + }); + } + finally + { + await ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.CmdletProcessRecordAsyncEnd); + } + } + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener)this).Cancel(); + base.StopProcessing(); + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public UpdateAzOracleDatabaseResourceManagerOracleSubscription_UpdateViaIdentityExpanded() + { + + } + + /// + new protected void WriteObject(object sendToPipeline) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline); + } + + /// + /// + new protected void WriteObject(object sendToPipeline, bool enumerateCollection) + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module.Instance.SanitizeOutput?.Invoke(sendToPipeline, __correlationId); + base.WriteObject(sendToPipeline, enumerateCollection); + } + + /// + /// a delegate that is called when the remote service returns default (any response code not handled elsewhere). + /// + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IErrorResponse + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onDefault(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnDefault(responseMessage, response, ref _returnNow); + // if overrideOnDefault has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // Error Response : default + var code = (await response)?.Code; + var message = (await response)?.Message; + if ((null == code || null == message)) + { + // Unrecognized Response. Create an error record based on what we have. + var ex = new Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.RestException(responseMessage, await response); + WriteError( new global::System.Management.Automation.ErrorRecord(ex, ex.Code, global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } + }); + } + else + { + WriteError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception($"[{code}] : {message}"), code?.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { body=_propertiesBody }) + { + ErrorDetails = new global::System.Management.Automation.ErrorDetails(message) { RecommendedAction = global::System.String.Empty } + }); + } + } + } + + /// a delegate that is called when the remote service returns 200 (OK). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + /// from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onOk(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task response) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnOk(responseMessage, response, ref _returnNow); + // if overrideOnOk has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onOk - response for 200 / application/json + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api20250301.IOracleSubscription + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.format.ps1xml b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.format.ps1xml new file mode 100644 index 000000000000..4d28aa4b2f4f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.format.ps1xml @@ -0,0 +1,554 @@ + + + + + AzureErrorRecords + + Microsoft.Azure.Commands.Profile.Errors.AzureErrorRecord + Microsoft.Azure.Commands.Profile.Errors.AzureExceptionRecord + Microsoft.Azure.Commands.Profile.Errors.AzureRestExceptionRecord + + + + + + Microsoft.Azure.Commands.Profile.Errors.AzureRestExceptionRecord + + AzureErrorRecords + + + $_.InvocationInfo.HistoryId + + + + + + + + ErrorCategory + + + ErrorDetail + + + + "{" + $_.InvocationInfo.MyCommand + "}" + + + + $_.InvocationInfo.Line + + + + $_.InvocationInfo.PositionMessage + + + + $_.InvocationInfo.BoundParameters + + + + $_.InvocationInfo.UnboundParameters + + + + $_.InvocationInfo.HistoryId + + + + + + + AzureErrorRecords + $_.GetType() -eq [Microsoft.Azure.Commands.Profile.Errors.AzureRestExceptionRecord] + + + + + RequestId + + + Message + + + ServerMessage + + + ServerResponse + + + RequestMessage + + + + "{" + $_.InvocationInfo.MyCommand + "}" + + + + $_.InvocationInfo.Line + + + + $_.InvocationInfo.PositionMessage + + + StackTrace + + + + $_.InvocationInfo.HistoryId + + + + + + + AzureErrorRecords + $_.GetType() -eq [Microsoft.Azure.Commands.Profile.Errors.AzureExceptionRecord] + + + + + Message + + + StackTrace + + + + $_.Exception.GetType() + + + + "{" + $_.InvocationInfo.MyCommand + "}" + + + + $_.InvocationInfo.Line + + + + $_.InvocationInfo.PositionMessage + + + + $_.InvocationInfo.HistoryId + + + + + + + + Microsoft.Azure.Commands.Profile.CommonModule.PSAzureServiceProfile + + Microsoft.Azure.Commands.Profile.CommonModule.PSAzureServiceProfile + + + + + Left + + + + Left + + + + + + + + Left + Name + + + Left + Description + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAccessToken + + Microsoft.Azure.Commands.Profile.Models.PSAccessToken + + + + + + + Token + + + ExpiresOn + + + Type + + + TenantId + + + UserId + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscriptionPolicy + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscriptionPolicy + + + + + Left + + + + Left + + + + Left + + + + + + + + Left + locationPlacementId + + + Left + QuotaId + + + Left + SpendingLimit + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + + + + + + Id + + + Type + + + Tenants + + + Credential + + + TenantMap + + + CertificateThumbprint + + + + $_.ExtendedProperties.GetEnumerator() + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSConfig + + Microsoft.Azure.Commands.Profile.Models.PSConfig + + + + + Left + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + + Left + Key + + + Left + Value + + + Left + AppliesTo + + + Left + Scope + + + Left + HelpMessage + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.generated.format.ps1xml b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.generated.format.ps1xml new file mode 100644 index 000000000000..8271581789c7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.generated.format.ps1xml @@ -0,0 +1,471 @@ + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment + + Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment + + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + + Left + Name + + + Left + ResourceManagerUrl + + + Left + ActiveDirectoryAuthority + + + Left + Type + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + + Left + Name + + + Left + Id + + + Left + TenantId + + + Left + State + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile + + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + + Left + $_.Context.Account.ToString() + + + Left + $_.Context.Subscription.Name + + + Left + $_.Context.Tenant.ToString() + + + Left + $_.Context.Environment.ToString() + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + 40 + Left + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + + Left + Name + + + Left + Account + + + Left + $_.Subscription.Name + + + Left + Environment + + + Left + $_.Tenant.ToString() + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + + + + Left + + + + Left + + + + Left + + + + Left + + + + + + + + Left + Id + + + Left + $_.Name + + + Left + $_.TenantCategory + + + Left + $_.Domains + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.types.ps1xml b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.types.ps1xml new file mode 100644 index 000000000000..2873f28fd663 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Accounts.types.ps1xml @@ -0,0 +1,306 @@ + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile + + + PSStandardMembers + + + SerializationDepth + 10 + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + PSStandardMembers + + + SerializationDepth + 10 + + + + + + + Microsoft.Azure.Commands.Common.Authentication.Core.AuthenticationStoreTokenCache + + + PSStandardMembers + + + SerializationMethod + SpecificProperties + + + PropertySerializationSet + + CacheData + + + + + + + + Microsoft.Azure.Commands.Common.Authentication.Core.ProtectedFileTokenCache + + + PSStandardMembers + + + SerializationMethod + SpecificProperties + + + PropertySerializationSet + + CacheData + + + + + + + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + PSStandardMembers + + + SerializationDepth + 10 + + + + + + Microsoft.Azure.Commands.Profile.Models.AzureContextConverter + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.nuspec b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.nuspec new file mode 100644 index 000000000000..c7025c12758f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.nuspec @@ -0,0 +1,19 @@ + + + + Az.Accounts + 2.13.1 + Microsoft Corporation + Microsoft Corporation + true + https://aka.ms/azps-license + https://github.com/Azure/azure-powershell + Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. + +For more information on account credential management, please visit the following: https://learn.microsoft.com/powershell/azure/authenticate-azureps + * Added the module name in breaking change messages +* Upgraded Microsoft.ApplicationInsights version from 2.13.1 to 2.18.0 + Microsoft Corporation. All rights reserved. + Azure ResourceManager ARM Accounts Authentication Environment Subscription PSModule PSIncludes_Cmdlet PSCmdlet_Disable-AzDataCollection PSCmdlet_Disable-AzContextAutosave PSCmdlet_Enable-AzDataCollection PSCmdlet_Enable-AzContextAutosave PSCmdlet_Remove-AzEnvironment PSCmdlet_Get-AzEnvironment PSCmdlet_Set-AzEnvironment PSCmdlet_Add-AzEnvironment PSCmdlet_Get-AzSubscription PSCmdlet_Connect-AzAccount PSCmdlet_Get-AzContext PSCmdlet_Set-AzContext PSCmdlet_Import-AzContext PSCmdlet_Save-AzContext PSCmdlet_Get-AzTenant PSCmdlet_Send-Feedback PSCmdlet_Resolve-AzError PSCmdlet_Select-AzContext PSCmdlet_Rename-AzContext PSCmdlet_Remove-AzContext PSCmdlet_Clear-AzContext PSCmdlet_Disconnect-AzAccount PSCmdlet_Get-AzContextAutosaveSetting PSCmdlet_Set-AzDefault PSCmdlet_Get-AzDefault PSCmdlet_Clear-AzDefault PSCmdlet_Register-AzModule PSCmdlet_Enable-AzureRmAlias PSCmdlet_Disable-AzureRmAlias PSCmdlet_Uninstall-AzureRm PSCmdlet_Invoke-AzRestMethod PSCmdlet_Get-AzAccessToken PSCmdlet_Open-AzSurveyLink PSCmdlet_Get-AzConfig PSCmdlet_Update-AzConfig PSCmdlet_Clear-AzConfig PSCmdlet_Export-AzConfig PSCmdlet_Import-AzConfig PSCommand_Disable-AzDataCollection PSCommand_Disable-AzContextAutosave PSCommand_Enable-AzDataCollection PSCommand_Enable-AzContextAutosave PSCommand_Remove-AzEnvironment PSCommand_Get-AzEnvironment PSCommand_Set-AzEnvironment PSCommand_Add-AzEnvironment PSCommand_Get-AzSubscription PSCommand_Connect-AzAccount PSCommand_Get-AzContext PSCommand_Set-AzContext PSCommand_Import-AzContext PSCommand_Save-AzContext PSCommand_Get-AzTenant PSCommand_Send-Feedback PSCommand_Resolve-AzError PSCommand_Select-AzContext PSCommand_Rename-AzContext PSCommand_Remove-AzContext PSCommand_Clear-AzContext PSCommand_Disconnect-AzAccount PSCommand_Get-AzContextAutosaveSetting PSCommand_Set-AzDefault PSCommand_Get-AzDefault PSCommand_Clear-AzDefault PSCommand_Register-AzModule PSCommand_Enable-AzureRmAlias PSCommand_Disable-AzureRmAlias PSCommand_Uninstall-AzureRm PSCommand_Invoke-AzRestMethod PSCommand_Get-AzAccessToken PSCommand_Open-AzSurveyLink PSCommand_Get-AzConfig PSCommand_Update-AzConfig PSCommand_Clear-AzConfig PSCommand_Export-AzConfig PSCommand_Import-AzConfig PSCommand_Add-AzAccount PSCommand_Login-AzAccount PSCommand_Remove-AzAccount PSCommand_Logout-AzAccount PSCommand_Select-AzSubscription PSCommand_Resolve-Error PSCommand_Save-AzProfile PSCommand_Get-AzDomain PSCommand_Invoke-AzRest PSCommand_Set-AzConfig + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.psd1 b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.psd1 new file mode 100644 index 000000000000..8b322becabf0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.psd1 @@ -0,0 +1,389 @@ +# +# Module manifest for module 'Az.Accounts' +# +# Generated by: Microsoft Corporation +# +# Generated on: 9/20/2023 +# + +@{ + +# Script module or binary module file associated with this manifest. +RootModule = 'Az.Accounts.psm1' + +# Version number of this module. +ModuleVersion = '2.13.1' + +# Supported PSEditions +CompatiblePSEditions = 'Core', 'Desktop' + +# ID used to uniquely identify this module +GUID = '17a2feff-488b-47f9-8729-e2cec094624c' + +# Author of this module +Author = 'Microsoft Corporation' + +# Company or vendor of this module +CompanyName = 'Microsoft Corporation' + +# Copyright statement for this module +Copyright = 'Microsoft Corporation. All rights reserved.' + +# Description of the functionality provided by this module +Description = 'Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. + +For more information on account credential management, please visit the following: https://learn.microsoft.com/powershell/azure/authenticate-azureps' + +# Minimum version of the PowerShell engine required by this module +PowerShellVersion = '5.1' + +# Name of the PowerShell host required by this module +# PowerShellHostName = '' + +# Minimum version of the PowerShell host required by this module +# PowerShellHostVersion = '' + +# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +DotNetFrameworkVersion = '4.7.2' + +# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. +# ClrVersion = '' + +# Processor architecture (None, X86, Amd64) required by this module +# ProcessorArchitecture = '' + +# Modules that must be imported into the global environment prior to importing this module +# RequiredModules = @() + +# Assemblies that must be loaded prior to importing this module +RequiredAssemblies = 'Microsoft.Azure.PowerShell.AssemblyLoading.dll', + 'Microsoft.Azure.PowerShell.Authentication.Abstractions.dll', + 'Microsoft.Azure.PowerShell.Authentication.dll', + 'Microsoft.Azure.PowerShell.Authenticators.dll', + 'Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll', + 'Microsoft.Azure.PowerShell.Clients.Authorization.dll', + 'Microsoft.Azure.PowerShell.Clients.Compute.dll', + 'Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll', + 'Microsoft.Azure.PowerShell.Clients.Monitor.dll', + 'Microsoft.Azure.PowerShell.Clients.Network.dll', + 'Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll', + 'Microsoft.Azure.PowerShell.Clients.ResourceManager.dll', + 'Microsoft.Azure.PowerShell.Common.dll', + 'Microsoft.Azure.PowerShell.Storage.dll', + 'Microsoft.Azure.PowerShell.Clients.Storage.Management.dll', + 'Microsoft.Azure.PowerShell.Clients.KeyVault.dll', + 'Microsoft.Azure.PowerShell.Clients.Websites.dll', + 'Hyak.Common.dll', 'Microsoft.ApplicationInsights.dll', + 'Microsoft.Azure.Common.dll', 'Microsoft.Rest.ClientRuntime.dll', + 'Microsoft.Rest.ClientRuntime.Azure.dll', + 'Microsoft.WindowsAzure.Storage.dll', + 'Microsoft.WindowsAzure.Storage.DataMovement.dll', + 'Microsoft.Azure.PowerShell.Clients.Aks.dll', + 'Microsoft.Azure.PowerShell.Strategies.dll', + 'Microsoft.Azure.PowerShell.Common.Share.dll', 'FuzzySharp.dll' + +# Script files (.ps1) that are run in the caller's environment prior to importing this module. +# ScriptsToProcess = @() + +# Type files (.ps1xml) to be loaded when importing this module +# TypesToProcess = @() + +# Format files (.ps1xml) to be loaded when importing this module +FormatsToProcess = 'Accounts.format.ps1xml', 'Accounts.generated.format.ps1xml' + +# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess +NestedModules = @() + +# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. +FunctionsToExport = @() + +# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. +CmdletsToExport = 'Disable-AzDataCollection', 'Disable-AzContextAutosave', + 'Enable-AzDataCollection', 'Enable-AzContextAutosave', + 'Remove-AzEnvironment', 'Get-AzEnvironment', 'Set-AzEnvironment', + 'Add-AzEnvironment', 'Get-AzSubscription', 'Connect-AzAccount', + 'Get-AzContext', 'Set-AzContext', 'Import-AzContext', 'Save-AzContext', + 'Get-AzTenant', 'Send-Feedback', 'Resolve-AzError', 'Select-AzContext', + 'Rename-AzContext', 'Remove-AzContext', 'Clear-AzContext', + 'Disconnect-AzAccount', 'Get-AzContextAutosaveSetting', + 'Set-AzDefault', 'Get-AzDefault', 'Clear-AzDefault', + 'Register-AzModule', 'Enable-AzureRmAlias', 'Disable-AzureRmAlias', + 'Uninstall-AzureRm', 'Invoke-AzRestMethod', 'Get-AzAccessToken', + 'Open-AzSurveyLink', 'Get-AzConfig', 'Update-AzConfig', + 'Clear-AzConfig', 'Export-AzConfig', 'Import-AzConfig' + +# Variables to export from this module +# VariablesToExport = @() + +# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. +AliasesToExport = 'Add-AzAccount', 'Login-AzAccount', 'Remove-AzAccount', + 'Logout-AzAccount', 'Select-AzSubscription', 'Resolve-Error', + 'Save-AzProfile', 'Get-AzDomain', 'Invoke-AzRest', 'Set-AzConfig' + +# DSC resources to export from this module +# DscResourcesToExport = @() + +# List of all modules packaged with this module +# ModuleList = @() + +# List of all files packaged with this module +# FileList = @() + +# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. +PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = 'Azure','ResourceManager','ARM','Accounts','Authentication','Environment','Subscription' + + # A URL to the license for this module. + LicenseUri = 'https://aka.ms/azps-license' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Azure/azure-powershell' + + # A URL to an icon representing this module. + # IconUri = '' + + # ReleaseNotes of this module + ReleaseNotes = '* Added the module name in breaking change messages +* Upgraded Microsoft.ApplicationInsights version from 2.13.1 to 2.18.0 ' + + # Prerelease string of this module + # Prerelease = '' + + # Flag to indicate whether the module requires explicit user acceptance for install/update/save + # RequireLicenseAcceptance = $false + + # External dependent modules of this module + # ExternalModuleDependencies = @() + + } # End of PSData hashtable + + } # End of PrivateData hashtable + +# HelpInfo URI of this module +# HelpInfoURI = '' + +# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. +# DefaultCommandPrefix = '' + +} + + +# SIG # Begin signature block +# MIIn0QYJKoZIhvcNAQcCoIInwjCCJ74CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCAk2HPcwhsJ45gq +# tueQH3lZy0qaJUF7KlbsF568k8m1kaCCDYUwggYDMIID66ADAgECAhMzAAADTU6R +# phoosHiPAAAAAANNMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI4WhcNMjQwMzE0MTg0MzI4WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDUKPcKGVa6cboGQU03ONbUKyl4WpH6Q2Xo9cP3RhXTOa6C6THltd2RfnjlUQG+ +# Mwoy93iGmGKEMF/jyO2XdiwMP427j90C/PMY/d5vY31sx+udtbif7GCJ7jJ1vLzd +# j28zV4r0FGG6yEv+tUNelTIsFmmSb0FUiJtU4r5sfCThvg8dI/F9Hh6xMZoVti+k +# bVla+hlG8bf4s00VTw4uAZhjGTFCYFRytKJ3/mteg2qnwvHDOgV7QSdV5dWdd0+x +# zcuG0qgd3oCCAjH8ZmjmowkHUe4dUmbcZfXsgWlOfc6DG7JS+DeJak1DvabamYqH +# g1AUeZ0+skpkwrKwXTFwBRltAgMBAAGjggGCMIIBfjAfBgNVHSUEGDAWBgorBgEE +# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUId2Img2Sp05U6XI04jli2KohL+8w +# VAYDVR0RBE0wS6RJMEcxLTArBgNVBAsTJE1pY3Jvc29mdCBJcmVsYW5kIE9wZXJh +# dGlvbnMgTGltaXRlZDEWMBQGA1UEBRMNMjMwMDEyKzUwMDUxNzAfBgNVHSMEGDAW +# gBRIbmTlUAXTgqoXNzcitW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8v +# d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIw +# MTEtMDctMDguY3JsMGEGCCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDov +# L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDEx +# XzIwMTEtMDctMDguY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIB +# ACMET8WuzLrDwexuTUZe9v2xrW8WGUPRQVmyJ1b/BzKYBZ5aU4Qvh5LzZe9jOExD +# YUlKb/Y73lqIIfUcEO/6W3b+7t1P9m9M1xPrZv5cfnSCguooPDq4rQe/iCdNDwHT +# 6XYW6yetxTJMOo4tUDbSS0YiZr7Mab2wkjgNFa0jRFheS9daTS1oJ/z5bNlGinxq +# 2v8azSP/GcH/t8eTrHQfcax3WbPELoGHIbryrSUaOCphsnCNUqUN5FbEMlat5MuY +# 94rGMJnq1IEd6S8ngK6C8E9SWpGEO3NDa0NlAViorpGfI0NYIbdynyOB846aWAjN +# fgThIcdzdWFvAl/6ktWXLETn8u/lYQyWGmul3yz+w06puIPD9p4KPiWBkCesKDHv +# XLrT3BbLZ8dKqSOV8DtzLFAfc9qAsNiG8EoathluJBsbyFbpebadKlErFidAX8KE +# usk8htHqiSkNxydamL/tKfx3V/vDAoQE59ysv4r3pE+zdyfMairvkFNNw7cPn1kH +# Gcww9dFSY2QwAxhMzmoM0G+M+YvBnBu5wjfxNrMRilRbxM6Cj9hKFh0YTwba6M7z +# ntHHpX3d+nabjFm/TnMRROOgIXJzYbzKKaO2g1kWeyG2QtvIR147zlrbQD4X10Ab +# rRg9CpwW7xYxywezj+iNAc+QmFzR94dzJkEPUSCJPsTFMIIHejCCBWKgAwIBAgIK +# YQ6Q0gAAAAAAAzANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNV +# BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv +# c29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlm +# aWNhdGUgQXV0aG9yaXR5IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEw +# OTA5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE +# BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYD +# VQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG +# 9w0BAQEFAAOCAg8AMIICCgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+la +# UKq4BjgaBEm6f8MMHt03a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc +# 6Whe0t+bU7IKLMOv2akrrnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4D +# dato88tt8zpcoRb0RrrgOGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+ +# lD3v++MrWhAfTVYoonpy4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nk +# kDstrjNYxbc+/jLTswM9sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6 +# A4aN91/w0FK/jJSHvMAhdCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmd +# X4jiJV3TIUs+UsS1Vz8kA/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL +# 5zmhD+kjSbwYuER8ReTBw3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zd +# sGbiwZeBe+3W7UvnSSmnEyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3 +# T8HhhUSJxAlMxdSlQy90lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS +# 4NaIjAsCAwEAAaOCAe0wggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRI +# bmTlUAXTgqoXNzcitW2oynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTAL +# BgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBD +# uRQFTuHqp8cx0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jv +# c29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf +# MDNfMjIuY3JsMF4GCCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3 +# dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf +# MDNfMjIuY3J0MIGfBgNVHSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEF +# BQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1h +# cnljcHMuaHRtMEAGCCsGAQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkA +# YwB5AF8AcwB0AGEAdABlAG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn +# 8oalmOBUeRou09h0ZyKbC5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7 +# v0epo/Np22O/IjWll11lhJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0b +# pdS1HXeUOeLpZMlEPXh6I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/ +# KmtYSWMfCWluWpiW5IP0wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvy +# CInWH8MyGOLwxS3OW560STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBp +# mLJZiWhub6e3dMNABQamASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJi +# hsMdYzaXht/a8/jyFqGaJ+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYb +# BL7fQccOKO7eZS/sl/ahXJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbS +# oqKfenoi+kiVH6v7RyOA9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sL +# gOppO6/8MO0ETI7f33VtY5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtX +# cVZOSEXAQsmbdlsKgEhr/Xmfwb1tbWrJUnMTDXpQzTGCGaIwghmeAgEBMIGVMH4x +# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt +# b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01p +# Y3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTECEzMAAANNTpGmGiiweI8AAAAA +# A00wDQYJYIZIAWUDBAIBBQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQw +# HAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIPqM +# nLtedTpCCZWzygnrN5qjriZa3nvW0MEUhgHrBf/kMEIGCisGAQQBgjcCAQwxNDAy +# oBSAEgBNAGkAYwByAG8AcwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20wDQYJKoZIhvcNAQEBBQAEggEAS7p4ZPALh+4+yJuTQhIPP+LV4A+Jom3lI5qs +# lp7zGTEfbcL8TMbAGgLGl186yuYk/eJlpkSh/cGFRhbcBzQUgXmUfAGnRYugqMXE +# VvX3Qil+ivulxYqiozTr9zWcJ3vitlWIAFJqTTmdHjP0smU7TqrS66Tk06fR4sXU +# x5BVXrlrIismo9vw+sA7wI8LHKwTB61N+w9w2QRDXotckocOV5R/T6ySpCkJfjiP +# V/Ht7VO4JbhDXBedTy9uZ6yQdaBJgmF21iJxacaeYL+StSI/OaHApGTHpJo0/l8K +# UzZmO3S3+sUX3NwAyZ6A4iTM3dGMPFTiEykJD41kS/eAZgy+TaGCFywwghcoBgor +# BgEEAYI3AwMBMYIXGDCCFxQGCSqGSIb3DQEHAqCCFwUwghcBAgEDMQ8wDQYJYIZI +# AWUDBAIBBQAwggFZBgsqhkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGE +# WQoDATAxMA0GCWCGSAFlAwQCAQUABCDzkxGA6Q74EKQNCUJRJIpLLx9SAzmpu+DM +# Ytnz01KnYQIGZN5VuexfGBMyMDIzMDkyMDA2MzM0Ni4wMjVaMASAAgH0oIHYpIHV +# MIHSMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH +# UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQL +# EyRNaWNyb3NvZnQgSXJlbGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsT +# HVRoYWxlcyBUU1MgRVNOOjA4NDItNEJFNi1DMjlBMSUwIwYDVQQDExxNaWNyb3Nv +# ZnQgVGltZS1TdGFtcCBTZXJ2aWNloIIRezCCBycwggUPoAMCAQICEzMAAAGybkAD +# f26plJIAAQAAAbIwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNV +# BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv +# c29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAg +# UENBIDIwMTAwHhcNMjIwOTIwMjAyMjAxWhcNMjMxMjE0MjAyMjAxWjCB0jELMAkG +# A1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQx +# HjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9z +# b2Z0IElyZWxhbmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMg +# VFNTIEVTTjowODQyLTRCRTYtQzI5QTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUt +# U3RhbXAgU2VydmljZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMqi +# ZTIde/lQ4rC+Bml5f/Wuq/xKTxrfbG23HofmQ+qZAN4GyO73PF3y9OAfpt7Qf2jc +# ldWOGUB+HzBuwllYyP3fx4MY8zvuAuB37FvoytnNC2DKnVrVlHOVcGUL9CnmhDNM +# A2/nskjIf2IoiG9J0qLYr8duvHdQJ9Li2Pq9guySb9mvUL60ogslCO9gkh6FiEDw +# MrwUr8Wja6jFpUTny8tg0N0cnCN2w4fKkp5qZcbUYFYicLSb/6A7pHCtX6xnjqwh +# mJoib3vkKJyVxbuFLRhVXxH95b0LHeNhifn3jvo2j+/4QV10jEpXVW+iC9BsTtR6 +# 9xvTjU51ZgP7BR4YDEWq7JsylSOv5B5THTDXRf184URzFhTyb8OZQKY7mqMh7c8J +# 8w1sEM4XDUF2UZNy829NVCzG2tfdEXZaHxF8RmxpQYBxyhZwY1rotuIS+gfN2eq+ +# hkAT3ipGn8/KmDwDtzAbnfuXjApgeZqwgcYJ8pDJ+y/xU6ouzJz1Bve5TTihkiA7 +# wQsQe6R60Zk9dPdNzw0MK5niRzuQZAt4GI96FhjhlUWcUZOCkv/JXM/OGu/rgSpl +# YwdmPLzzfDtXyuy/GCU5I4l08g6iifXypMgoYkkceOAAz4vx1x0BOnZWfI3fSwqN +# UvoN7ncTT+MB4Vpvf1QBppjBAQUuvui6eCG0MCVNAgMBAAGjggFJMIIBRTAdBgNV +# HQ4EFgQUmfIngFzZEZlPkjDOVluBSDDaanEwHwYDVR0jBBgwFoAUn6cVXQBeYl2D +# 9OXSZacbUzUZ6XIwXwYDVR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3Nv +# ZnQuY29tL3BraW9wcy9jcmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUy +# MDIwMTAoMSkuY3JsMGwGCCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDov +# L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1l +# LVN0YW1wJTIwUENBJTIwMjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAWBgNVHSUB +# Af8EDDAKBggrBgEFBQcDCDAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQAD +# ggIBANxHtu3FzIabaDbWqswdKBlAhKXRCN+5CSMiv2TYa4i2QuWIm+99piwAhDhA +# Dfbqor1zyLi95Y6GQnvIWUgdeC7oL1ZtZye92zYK+EIfwYZmhS+CH4infAzUvscH +# ZF3wlrJUfPUIDGVP0lCYVse9mguvG0dqkY4ayQPEHOvJubgZZaOdg/N8dInd6fGe +# Oc+0DoGzB+LieObJ2Q0AtEt3XN3iX8Cp6+dZTX8xwE/LvhRwPpb/+nKshO7TVuve +# nwdTwqB/LT6CNPaElwFeKxKrqRTPMbHeg+i+KnBLfwmhEXsMg2s1QX7JIxfvT96m +# d0eiMjiMEO22LbOzmLMNd3LINowAnRBAJtX+3/e390B9sMGMHp+a1V+hgs62AopB +# l0p/00li30DN5wEQ5If35Zk7b/T6pEx6rJUDYCti7zCbikjKTanBnOc99zGMlej5 +# X+fC/k5ExUCrOs3/VzGRCZt5LvVQSdWqq/QMzTEmim4sbzASK9imEkjNtZZyvC1C +# sUcD1voFktld4mKMjE+uDEV3IddD+DrRk94nVzNPSuZXewfVOnXHSeqG7xM3V7fl +# 2aL4v1OhL2+JwO1Tx3B0irO1O9qbNdJk355bntd1RSVKgM22KFBHnoL7Js7pRhBi +# aKmVTQGoOb+j1Qa7q+cixGo48Vh9k35BDsJS/DLoXFSPDl4mMIIHcTCCBVmgAwIB +# AgITMwAAABXF52ueAptJmQAAAAAAFTANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UE +# BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAc +# BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0 +# IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEwOTMwMTgyMjI1 +# WhcNMzAwOTMwMTgzMjI1WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGlu +# Z3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBv +# cmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDCC +# AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAOThpkzntHIhC3miy9ckeb0O +# 1YLT/e6cBwfSqWxOdcjKNVf2AX9sSuDivbk+F2Az/1xPx2b3lVNxWuJ+Slr+uDZn +# hUYjDLWNE893MsAQGOhgfWpSg0S3po5GawcU88V29YZQ3MFEyHFcUTE3oAo4bo3t +# 1w/YJlN8OWECesSq/XJprx2rrPY2vjUmZNqYO7oaezOtgFt+jBAcnVL+tuhiJdxq +# D89d9P6OU8/W7IVWTe/dvI2k45GPsjksUZzpcGkNyjYtcI4xyDUoveO0hyTD4MmP +# frVUj9z6BVWYbWg7mka97aSueik3rMvrg0XnRm7KMtXAhjBcTyziYrLNueKNiOSW +# rAFKu75xqRdbZ2De+JKRHh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9fvzZnkXftnIv +# 231fgLrbqn427DZM9ituqBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdHGO2n6Jl8P0zb +# r17C89XYcz1DTsEzOUyOArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7XKHYC4jMYcten +# IPDC+hIK12NvDMk2ZItboKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiER9vcG9H9stQc +# xWv2XFJRXRLbJbqvUAV6bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/eKtFtvUeh17a +# j54WcmnGrnu3tz5q4i6tAgMBAAGjggHdMIIB2TASBgkrBgEEAYI3FQEEBQIDAQAB +# MCMGCSsGAQQBgjcVAgQWBBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAdBgNVHQ4EFgQU +# n6cVXQBeYl2D9OXSZacbUzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEEAYI3TIN9AQEw +# QTA/BggrBgEFBQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9E +# b2NzL1JlcG9zaXRvcnkuaHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQB +# gjcUAgQMHgoAUwB1AGIAQwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/ +# MB8GA1UdIwQYMBaAFNX2VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1UdHwRPME0wS6BJ +# oEeGRWh0dHA6Ly9jcmwubWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01p +# Y1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYB +# BQUHMAKGPmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljUm9v +# Q2VyQXV0XzIwMTAtMDYtMjMuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCdVX38Kq3h +# LB9nATEkW+Geckv8qW/qXBS2Pk5HZHixBpOXPTEztTnXwnE2P9pkbHzQdTltuw8x +# 5MKP+2zRoZQYIu7pZmc6U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gngugnue99qb74p +# y27YP0h1AdkY3m2CDPVtI1TkeFN1JFe53Z/zjj3G82jfZfakVqr3lbYoVSfQJL1A +# oL8ZthISEV09J+BAljis9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHCgRlCGVJ1ijbC +# HcNhcy4sa3tuPywJeBTpkbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6MhrZlvSP9pEB +# 9s7GdP32THJvEKt1MMU0sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEUBHG/ZPkkvnNt +# yo4JvbMBV0lUZNlz138eW0QBjloZkWsNn6Qo3GcZKCS6OEuabvshVGtqRRFHqfG3 +# rsjoiV5PndLQTHa1V1QJsWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+fpO+y/g75LcV +# v7TOPqUxUYS8vwLBgqJ7Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrpNPgkNWcr4A24 +# 5oyZ1uEi6vAnQj0llOZ0dFtq0Z4+7X6gMTN9vMvpe784cETRkPHIqzqKOghif9lw +# Y1NNje6CbaUFEMFxBmoQtB1VM1izoXBm8qGCAtcwggJAAgEBMIIBAKGB2KSB1TCB +# 0jELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1Jl +# ZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMk +# TWljcm9zb2Z0IElyZWxhbmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1U +# aGFsZXMgVFNTIEVTTjowODQyLTRCRTYtQzI5QTElMCMGA1UEAxMcTWljcm9zb2Z0 +# IFRpbWUtU3RhbXAgU2VydmljZaIjCgEBMAcGBSsOAwIaAxUAjhJ+EeySRfn2KCNs +# jn9cF9AUSTqggYMwgYCkfjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGlu +# Z3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBv +# cmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAN +# BgkqhkiG9w0BAQUFAAIFAOi0+i0wIhgPMjAyMzA5MjAxMjU3MTdaGA8yMDIzMDky +# MTEyNTcxN1owdzA9BgorBgEEAYRZCgQBMS8wLTAKAgUA6LT6LQIBADAKAgEAAgIR +# nAIB/zAHAgEAAgIR0DAKAgUA6LZLrQIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgor +# BgEEAYRZCgMCoAowCAIBAAIDB6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUA +# A4GBAGjRjrn62VuBz/kNRF8KdoG4YOpoAZu0e3XBc+tcCCiG1Je/ZYXUzMrrq/cz +# MFXWzdmSQRBFPRvcFJw8LcTRu4C6eQOJywts4MMoyE3nJOUUUsOB/i2h2w7L/fo0 +# 3EeEXVTQn/aSK7jkMyysxQEWOw64WNG06Sd08ZDadqbnAc7zMYIEDTCCBAkCAQEw +# gZMwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT +# B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UE +# AxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAGybkADf26plJIA +# AQAAAbIwDQYJYIZIAWUDBAIBBQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0B +# CRABBDAvBgkqhkiG9w0BCQQxIgQgDd3716NLDTxGc+0tAskrKgBsB9PO5RK3smyU +# vyfE7/owgfoGCyqGSIb3DQEJEAIvMYHqMIHnMIHkMIG9BCBTeM485+E+t4PEVieU +# oFKX7PVyLo/nzu+htJPCG04+NTCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1w +# IFBDQSAyMDEwAhMzAAABsm5AA39uqZSSAAEAAAGyMCIEILLYuf/URU9tiFRXIhgo +# OAyZuYAFYpFAH2I0pLSN1lWkMA0GCSqGSIb3DQEBCwUABIICAMQZqLlhmv19+CcR +# claEHbZr4MgJjWr2Da27FqRgoOLDtNaS/IZ16UHukAV7JVdIOdVroxfvVdWXh5iq +# dSAfYNMkSBBPxxLbSFnndIw7KWkp3vbxFcJ6+JsK9k54TDZAUP17OpTM11gpTYfm +# uVAWZaqh086moHKLZsjVU/rzFA3En+QY5ZticB0LytwkIY+7pS6ikN4Q3e/pzPLH +# CSa2OZN3bXezZzOWMFLQwJ2IQJLpCKs0RiICTOaOKTpsjcoK2eBLwzXsgnnNZmj/ +# q1XMWGUJbnNJH4mszFVJ6X0cUo3OJvkF9V796VoZZMUS9i0EmCUZNE0rcvPdBnIE +# c8P+QSbLudmDA+XXno2ItqeA1ZkatNLyZGYGSjK4BU48MzcHMkWKCcUlqyfUiJt7 +# 7UGXDTuCzVkqCVVo7XpJNbN7X1oLkh8yTPr5RBbmlzzykIfEkoVnYj4Qc89ohb1N +# qXKDWby0ldBFOZIgyOgRiYJ984yyeAAXvOpTexhDtDCguYGfV56U+NTMve18Oa8u +# IODMD1Nfr+JLHL+J2tkMfZGFa71tGGnI2w9W6xUltjs8XINLrF08szKC6Vlo20wl +# F09Em/cF6qbZ2cnC/BDOt3xDDnJHYOHLR9QCZABbMd7JiuH32PE5C79PbpPYzyje +# p0LB6iM1n1UYaSSFWCx/a3Itdf6/ +# SIG # End signature block diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.psm1 b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.psm1 new file mode 100644 index 000000000000..2022fcfde49d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Az.Accounts.psm1 @@ -0,0 +1,365 @@ +# +# Script module for module 'Az.Accounts' that is executed when 'Az.Accounts' is imported in a PowerShell session. +# +# Generated by: Microsoft Corporation +# +# Generated on: 09/20/2023 05:38:15 +# + +$PSDefaultParameterValues.Clear() +Set-StrictMode -Version Latest + +function Test-DotNet +{ + try + { + if ((Get-PSDrive 'HKLM' -ErrorAction Ignore) -and (-not (Get-ChildItem 'HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\' -ErrorAction Stop | Get-ItemPropertyValue -ErrorAction Stop -Name Release | Where-Object { $_ -ge 461808 }))) + { + throw ".NET Framework versions lower than 4.7.2 are not supported in Az. Please upgrade to .NET Framework 4.7.2 or higher." + } + } + catch [System.Management.Automation.DriveNotFoundException] + { + Write-Verbose ".NET Framework version check failed." + } +} + +function Preload-Assembly { + param ( + [string] + $AssemblyDirectory + ) + if($PSEdition -eq 'Desktop' -and (Test-Path $AssemblyDirectory -ErrorAction Ignore)) + { + try + { + Get-ChildItem -ErrorAction Stop -Path $AssemblyDirectory -Filter "*.dll" | ForEach-Object { + try + { + Add-Type -Path $_.FullName -ErrorAction Ignore | Out-Null + } + catch { + Write-Verbose $_ + } + } + } + catch {} + } +} + +if ($true -and ($PSEdition -eq 'Desktop')) +{ + if ($PSVersionTable.PSVersion -lt [Version]'5.1') + { + throw "PowerShell versions lower than 5.1 are not supported in Az. Please upgrade to PowerShell 5.1 or higher." + } + + Test-DotNet +} + +if ($true -and ($PSEdition -eq 'Core')) +{ + if ($PSVersionTable.PSVersion -lt [Version]'6.2.4') + { + throw "Current Az version doesn't support PowerShell Core versions lower than 6.2.4. Please upgrade to PowerShell Core 6.2.4 or higher." + } + if ($PSVersionTable.PSVersion -lt [Version]'7.0.6') + { + Write-Warning "This version of Az.Accounts is only supported on Windows PowerShell 5.1 and PowerShell 7.0.6 or greater, open https://aka.ms/install-powershell to learn how to upgrade. For further information, go to https://aka.ms/azpslifecycle." + } +} + +if (Test-Path -Path "$PSScriptRoot\StartupScripts" -ErrorAction Ignore) +{ + Get-ChildItem "$PSScriptRoot\StartupScripts" -ErrorAction Stop | ForEach-Object { + . $_.FullName + } +} + +# [windows powershell] preload assemblies +if ($PSEdition -eq "Desktop") { + [Microsoft.Azure.PowerShell.AssemblyLoading.ConditionalAssemblyProvider]::GetAssemblies().Values | ForEach-Object { + $path = $_.Item1 + try { + Add-Type -Path $path -ErrorAction Ignore | Out-Null + } + catch { + Write-Verbose "Could not preload $path" + } + } +} + +# [windows powershell] preload module alc assemblies +$preloadPath = (Join-Path $PSScriptRoot -ChildPath "ModuleAlcAssemblies") +Preload-Assembly -AssemblyDirectory $preloadPath + +if (Get-Module AzureRM.profile -ErrorAction Ignore) +{ + Write-Warning ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") + throw ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") +} + +Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll) + + +if (Test-Path -Path "$PSScriptRoot\PostImportScripts" -ErrorAction Ignore) +{ + Get-ChildItem "$PSScriptRoot\PostImportScripts" -ErrorAction Stop | ForEach-Object { + . $_.FullName + } +} + +$FilteredCommands = @() + +if ($Env:ACC_CLOUD -eq $null) +{ + $FilteredCommands | ForEach-Object { + + $existingDefault = $false + foreach ($key in $global:PSDefaultParameterValues.Keys) + { + if ($_ -like "$key") + { + $existingDefault = $true + } + } + + if (!$existingDefault) + { + $global:PSDefaultParameterValues.Add($_, + { + if ((Get-Command Get-AzContext -ErrorAction Ignore) -eq $null) + { + $context = Get-AzureRmContext + } + else + { + $context = Get-AzContext + } + if (($context -ne $null) -and $context.ExtendedProperties.ContainsKey("Default Resource Group")) { + $context.ExtendedProperties["Default Resource Group"] + } + }) + } + } +} + +[Microsoft.Azure.Commands.Profile.Utilities.CommandNotFoundHelper]::RegisterCommandNotFoundAction($ExecutionContext.InvokeCommand) + +# SIG # Begin signature block +# MIInwgYJKoZIhvcNAQcCoIInszCCJ68CAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCb9fJw7tRJSjyo +# JEg82Xj/MrcwppXsz44viAgrYDK20aCCDXYwggX0MIID3KADAgECAhMzAAADTrU8 +# esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDdCKiNI6IBFWuvJUmf6WdOJqZmIwYs5G7AJD5UbcL6tsC+EBPDbr36pFGo1bsU +# p53nRyFYnncoMg8FK0d8jLlw0lgexDDr7gicf2zOBFWqfv/nSLwzJFNP5W03DF/1 +# 1oZ12rSFqGlm+O46cRjTDFBpMRCZZGddZlRBjivby0eI1VgTD1TvAdfBYQe82fhm +# WQkYR/lWmAK+vW/1+bO7jHaxXTNCxLIBW07F8PBjUcwFxxyfbe2mHB4h1L4U0Ofa +# +HX/aREQ7SqYZz59sXM2ySOfvYyIjnqSO80NGBaz5DvzIG88J0+BNhOu2jl6Dfcq +# jYQs1H/PMSQIK6E7lXDXSpXzAgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE +# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUnMc7Zn/ukKBsBiWkwdNfsN5pdwAw +# RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW +# MBQGA1UEBRMNMjMwMDEyKzUwMDUxNjAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci +# tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG +# CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu +# Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 +# MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAD21v9pHoLdBSNlFAjmk +# mx4XxOZAPsVxxXbDyQv1+kGDe9XpgBnT1lXnx7JDpFMKBwAyIwdInmvhK9pGBa31 +# TyeL3p7R2s0L8SABPPRJHAEk4NHpBXxHjm4TKjezAbSqqbgsy10Y7KApy+9UrKa2 +# kGmsuASsk95PVm5vem7OmTs42vm0BJUU+JPQLg8Y/sdj3TtSfLYYZAaJwTAIgi7d +# hzn5hatLo7Dhz+4T+MrFd+6LUa2U3zr97QwzDthx+RP9/RZnur4inzSQsG5DCVIM +# pA1l2NWEA3KAca0tI2l6hQNYsaKL1kefdfHCrPxEry8onJjyGGv9YKoLv6AOO7Oh +# JEmbQlz/xksYG2N/JSOJ+QqYpGTEuYFYVWain7He6jgb41JbpOGKDdE/b+V2q/gX +# UgFe2gdwTpCDsvh8SMRoq1/BNXcr7iTAU38Vgr83iVtPYmFhZOVM0ULp/kKTVoir +# IpP2KCxT4OekOctt8grYnhJ16QMjmMv5o53hjNFXOxigkQWYzUO+6w50g0FAeFa8 +# 5ugCCB6lXEk21FFB1FdIHpjSQf+LP/W2OV/HfhC3uTPgKbRtXo83TZYEudooyZ/A +# Vu08sibZ3MkGOJORLERNwKm2G7oqdOv4Qj8Z0JrGgMzj46NFKAxkLSpE5oHQYP1H +# tPx1lPfD7iNSbJsP6LiUHXH1MIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq +# hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x +# EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv +# bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 +# IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG +# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG +# A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg +# Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +# CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 +# a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr +# rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg +# OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy +# 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 +# sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh +# dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k +# A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB +# w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn +# Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 +# lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w +# ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o +# ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD +# VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa +# BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny +# bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG +# AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t +# L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV +# HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 +# dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG +# AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl +# AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb +# C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l +# hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 +# I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 +# wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 +# STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam +# ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa +# J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah +# XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA +# 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt +# Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr +# /Xmfwb1tbWrJUnMTDXpQzTGCGaIwghmeAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw +# EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN +# aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp +# Z25pbmcgUENBIDIwMTECEzMAAANOtTx6wYRv6ysAAAAAA04wDQYJYIZIAWUDBAIB +# BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO +# MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIBsLZoT0GL3AfKW+v1FN9bVc +# VG31uoPh0H8hDfNXM1ivMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A +# cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB +# BQAEggEAjm1RFaOR3jSivggTJhg8Xe4uZwJNAA0kGjYaTLK0sO7bf6gszj9yyZOW +# xl5OXc3I5e8idePoA9U2yMuNyGLP10P/SjCg/FSClm4PZr0HA1ORNDHn85kNLc+7 +# sQMWCkOiYLKNq/TudhmRGfeuEzjeZSiXKGbB65Fr5LeqGAuMNcZ5lKsP4Es7Cavs +# hG+lQd/27Lrb3xnB5LF5FZ9blmjY9UcS0hBnd6x/ynOB4WBFBjsu42fJZz2xx/04 +# panwkiuigz301YvY0maYIiNYJOWaNU32fVM+YX9b7+Iq5plTEx8XhWsexqmQTv9H +# jMkZa/2RkYvkbGfHQ3Ckw/oYI1NydKGCFywwghcoBgorBgEEAYI3AwMBMYIXGDCC +# FxQGCSqGSIb3DQEHAqCCFwUwghcBAgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFZBgsq +# hkiG9w0BCRABBKCCAUgEggFEMIIBQAIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl +# AwQCAQUABCCehXSh9EH4ZOe8kqIKTs5kjZxVf/mTlUUsukZabtyKDwIGZN/OPZ5t +# GBMyMDIzMDkyMDA1NTAzNS4zNjZaMASAAgH0oIHYpIHVMIHSMQswCQYDVQQGEwJV +# UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE +# ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJl +# bGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1MgRVNO +# OkQwODItNEJGRC1FRUJBMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBT +# ZXJ2aWNloIIRezCCBycwggUPoAMCAQICEzMAAAG6Hz8Z98F1vXwAAQAAAbowDQYJ +# KoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x +# EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv +# bjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwHhcNMjIw +# OTIwMjAyMjE5WhcNMjMxMjE0MjAyMjE5WjCB0jELMAkGA1UEBhMCVVMxEzARBgNV +# BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv +# c29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxhbmQgT3Bl +# cmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpEMDgyLTRC +# RkQtRUVCQTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2VydmljZTCC +# AiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAIhOFYMzkjWAE9UVnXF9hRGv +# 0xBRxc+I5Hu3hxVFXyK3u38xusEb0pLkwjgGtDsaLLbrlMxqX3tFb/3BgEPEC3L0 +# wX76gD8zHt+wiBV5mq5BWop29qRrgMJKKCPcpQnSjs9B/4XMFFvrpdPicZDv43FL +# gz9fHqMq0LJDw5JAHGDS30TCY9OF43P4d44Z9lE7CaVS2pJMF3L453MXB5yYK/KD +# bilhERP1jxn2yl+tGCRguIAsMG0oeOhXaw8uSGOhS6ACSHb+ebi0038MFHyoTNhK +# f+SYo4OpSY3xP4+swBBTKDoYP1wH+CfxG6h9fymBJQPQZaqfl0riiDLjmDunQtH1 +# GD64Air5k9Jdwhq5wLmSWXjyFVL+IDfOpdixJ6f5o+MhE6H4t31w+prygHmd2UHQ +# 657UGx6FNuzwC+SpAHmV76MZYac4uAhTgaP47P2eeS1ockvyhl9ya+9JzPfMkug3 +# xevzFADWiLRMr066EMV7q3JSRAsnCS9GQ08C4FKPbSh8OPM33Lng0ffxANnHAAX/ +# DE7cHcx7l9jaV3Acmkj7oqir4Eh2u5YxwiaTE37XaMumX2ES3PJ5NBaXq7YdLJwy +# SD+U9pk/tl4dQ1t/Eeo7uDTliOyQkD8I74xpVB0T31/67KHfkBkFVvy6wye21V+9 +# IC8uSD++RgD3RwtN2kE/AgMBAAGjggFJMIIBRTAdBgNVHQ4EFgQUimLm8QMeJa25 +# j9MWeabI2HSvZOUwHwYDVR0jBBgwFoAUn6cVXQBeYl2D9OXSZacbUzUZ6XIwXwYD +# VR0fBFgwVjBUoFKgUIZOaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9j +# cmwvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3JsMGwG +# CCsGAQUFBwEBBGAwXjBcBggrBgEFBQcwAoZQaHR0cDovL3d3dy5taWNyb3NvZnQu +# Y29tL3BraW9wcy9jZXJ0cy9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIw +# MjAxMCgxKS5jcnQwDAYDVR0TAQH/BAIwADAWBgNVHSUBAf8EDDAKBggrBgEFBQcD +# CDAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQADggIBAF/I8U6hbZhvDcn9 +# 6nZ6tkbSEjXPvKZ6wroaXcgstEhpgaeEwleLuPXHLzEWtuJuYz4eshmhXqFr49lb +# AcX5SN5/cEsP0xdFayb7U5P94JZd3HjFvpWRNoNBhF3SDM0A38sI2H+hjhB/VfX1 +# XcZiei1ROPAyCHcBgHLyQrEu6mnb3HhbIdr8h0Ta7WFylGhLSFW6wmzKusP6aOlm +# nGSac5NMfla6lRvTYHd28rbbCgfSm1RhTgoZj+W8DTKtiEMwubHJ3mIPKmo8xtJI +# WXPnXq6XKgldrL5cynLMX/0WX65OuWbHV5GTELdfWvGV3DaZrHPUQ/UP31Keqb2x +# jVCb30LVwgbjIvYS77N1dARkN8F/9pJ1gO4IvZWMwyMlKKFGojO1f1wbjSWcA/57 +# tsc+t2blrMWgSNHgzDr01jbPSupRjy3Ht9ZZs4xN02eiX3eG297NrtC6l4c/gzn2 +# 0eqoqWx/uHWxmTgB0F5osBuTHOe77DyEA0uhArGlgKP91jghgt/OVHoH65g0QqCt +# gZ+36mnCEg6IOhFoFrCc0fJFGVmb1+17gEe+HRMM7jBk4O06J+IooFrI3e3PJjPr +# Qano/MyE3h+zAuBWGMDRcUlNKCDU7dGnWvH3XWwLrCCIcz+3GwRUMsLsDdPW2OVv +# 7v1eEJiMSIZ2P+M7L20Q8aznU4OAMIIHcTCCBVmgAwIBAgITMwAAABXF52ueAptJ +# mQAAAAAAFTANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgT +# Cldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29m +# dCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNh +# dGUgQXV0aG9yaXR5IDIwMTAwHhcNMjEwOTMwMTgyMjI1WhcNMzAwOTMwMTgzMjI1 +# WjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH +# UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD +# Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDCCAiIwDQYJKoZIhvcNAQEB +# BQADggIPADCCAgoCggIBAOThpkzntHIhC3miy9ckeb0O1YLT/e6cBwfSqWxOdcjK +# NVf2AX9sSuDivbk+F2Az/1xPx2b3lVNxWuJ+Slr+uDZnhUYjDLWNE893MsAQGOhg +# fWpSg0S3po5GawcU88V29YZQ3MFEyHFcUTE3oAo4bo3t1w/YJlN8OWECesSq/XJp +# rx2rrPY2vjUmZNqYO7oaezOtgFt+jBAcnVL+tuhiJdxqD89d9P6OU8/W7IVWTe/d +# vI2k45GPsjksUZzpcGkNyjYtcI4xyDUoveO0hyTD4MmPfrVUj9z6BVWYbWg7mka9 +# 7aSueik3rMvrg0XnRm7KMtXAhjBcTyziYrLNueKNiOSWrAFKu75xqRdbZ2De+JKR +# Hh09/SDPc31BmkZ1zcRfNN0Sidb9pSB9fvzZnkXftnIv231fgLrbqn427DZM9itu +# qBJR6L8FA6PRc6ZNN3SUHDSCD/AQ8rdHGO2n6Jl8P0zbr17C89XYcz1DTsEzOUyO +# ArxCaC4Q6oRRRuLRvWoYWmEBc8pnol7XKHYC4jMYctenIPDC+hIK12NvDMk2ZItb +# oKaDIV1fMHSRlJTYuVD5C4lh8zYGNRiER9vcG9H9stQcxWv2XFJRXRLbJbqvUAV6 +# bMURHXLvjflSxIUXk8A8FdsaN8cIFRg/eKtFtvUeh17aj54WcmnGrnu3tz5q4i6t +# AgMBAAGjggHdMIIB2TASBgkrBgEEAYI3FQEEBQIDAQABMCMGCSsGAQQBgjcVAgQW +# BBQqp1L+ZMSavoKRPEY1Kc8Q/y8E7jAdBgNVHQ4EFgQUn6cVXQBeYl2D9OXSZacb +# UzUZ6XIwXAYDVR0gBFUwUzBRBgwrBgEEAYI3TIN9AQEwQTA/BggrBgEFBQcCARYz +# aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9Eb2NzL1JlcG9zaXRvcnku +# aHRtMBMGA1UdJQQMMAoGCCsGAQUFBwMIMBkGCSsGAQQBgjcUAgQMHgoAUwB1AGIA +# QwBBMAsGA1UdDwQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNX2 +# VsuP6KJcYmjRPZSQW9fOmhjEMFYGA1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwu +# bWljcm9zb2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0NlckF1dF8yMDEw +# LTA2LTIzLmNybDBaBggrBgEFBQcBAQROMEwwSgYIKwYBBQUHMAKGPmh0dHA6Ly93 +# d3cubWljcm9zb2Z0LmNvbS9wa2kvY2VydHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYt +# MjMuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQCdVX38Kq3hLB9nATEkW+Geckv8qW/q +# XBS2Pk5HZHixBpOXPTEztTnXwnE2P9pkbHzQdTltuw8x5MKP+2zRoZQYIu7pZmc6 +# U03dmLq2HnjYNi6cqYJWAAOwBb6J6Gngugnue99qb74py27YP0h1AdkY3m2CDPVt +# I1TkeFN1JFe53Z/zjj3G82jfZfakVqr3lbYoVSfQJL1AoL8ZthISEV09J+BAljis +# 9/kpicO8F7BUhUKz/AyeixmJ5/ALaoHCgRlCGVJ1ijbCHcNhcy4sa3tuPywJeBTp +# kbKpW99Jo3QMvOyRgNI95ko+ZjtPu4b6MhrZlvSP9pEB9s7GdP32THJvEKt1MMU0 +# sHrYUP4KWN1APMdUbZ1jdEgssU5HLcEUBHG/ZPkkvnNtyo4JvbMBV0lUZNlz138e +# W0QBjloZkWsNn6Qo3GcZKCS6OEuabvshVGtqRRFHqfG3rsjoiV5PndLQTHa1V1QJ +# sWkBRH58oWFsc/4Ku+xBZj1p/cvBQUl+fpO+y/g75LcVv7TOPqUxUYS8vwLBgqJ7 +# Fx0ViY1w/ue10CgaiQuPNtq6TPmb/wrpNPgkNWcr4A245oyZ1uEi6vAnQj0llOZ0 +# dFtq0Z4+7X6gMTN9vMvpe784cETRkPHIqzqKOghif9lwY1NNje6CbaUFEMFxBmoQ +# tB1VM1izoXBm8qGCAtcwggJAAgEBMIIBAKGB2KSB1TCB0jELMAkGA1UEBhMCVVMx +# EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT +# FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEtMCsGA1UECxMkTWljcm9zb2Z0IElyZWxh +# bmQgT3BlcmF0aW9ucyBMaW1pdGVkMSYwJAYDVQQLEx1UaGFsZXMgVFNTIEVTTjpE +# MDgyLTRCRkQtRUVCQTElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2Vy +# dmljZaIjCgEBMAcGBSsOAwIaAxUAdqNHe113gCJ87aZIGa5QBUqIwvKggYMwgYCk +# fjB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH +# UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQD +# Ex1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDANBgkqhkiG9w0BAQUFAAIF +# AOi0eZswIhgPMjAyMzA5MjAwMzQ4NDNaGA8yMDIzMDkyMTAzNDg0M1owdzA9Bgor +# BgEEAYRZCgQBMS8wLTAKAgUA6LR5mwIBADAKAgEAAgIL+AIB/zAHAgEAAgIULDAK +# AgUA6LXLGwIBADA2BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAowCAIB +# AAIDB6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEBBQUAA4GBAClyBBu79vwaDEgr +# sDdtLY+7se9ISbk8pveb65oGP9gabWe8mNnqfg1SxEN1eW2I4ihQvT2bQVBGeDi7 +# wVO+vcDBDl/uDAaYT7wKES/l/PJORKyBmUoDGFoLJT7bHa+uqFek2mjsC8RIlpdj +# oVOh5HQksZd5HgNF4K/uv2nUyKuEMYIEDTCCBAkCAQEwgZMwfDELMAkGA1UEBhMC +# VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNV +# BAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRp +# bWUtU3RhbXAgUENBIDIwMTACEzMAAAG6Hz8Z98F1vXwAAQAAAbowDQYJYIZIAWUD +# BAIBBQCgggFKMBoGCSqGSIb3DQEJAzENBgsqhkiG9w0BCRABBDAvBgkqhkiG9w0B +# CQQxIgQgbjk/IiL8KyUtICVXFblxmt8j6F3g0s6KsH+WJzhAIqAwgfoGCyqGSIb3 +# DQEJEAIvMYHqMIHnMIHkMIG9BCApVb08M25w+tYGWsmlGtp1gy1nPcqWfqgMF3nl +# WYVzBTCBmDCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9u +# MRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRp +# b24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAAB +# uh8/GffBdb18AAEAAAG6MCIEIJ9hCOdmkSHZdWHnjcQBaILiGo+/uNr71agjiWaN +# bF2dMA0GCSqGSIb3DQEBCwUABIICACgD9Dbo/LkUWEGprq7D+RTXofFwwH6qSKeh +# N1y8UNvmYAtF83AuC2amIWELSmnnblZEv1sMvjteyyLsLRuid8la04mjjLUBduUN +# yGhij+4aarTuuVuwf/Ap273AGk1mv3slKF3R7lQnObcO4SEXYYoDeBDY/HI8Pa3g +# 6FkNw18RsDp3Atj0Eun/UZaL+XCNHPJCsLoEK69bz9cxhiEwQfcEhc9kDzKTqjZV +# Yla/8Qh+WoC/0uQz1lEpQvP4vrSVOXw89ZGUicwjRHZ3Oys2IgPu5vrG3BeFZNCO +# q3ieylUYWrOBvIxZQWcHR5tqmwdQDnUHRR6vZNVxqErZ0dLdd824gFoKGUbup0MG +# SdD/k2nffp38SFvsfiDiO6DRwt49LX5ClzxeXt4LFv9GTNq4/9vlInIQoi9BujGg +# 3vJIDEVxEDZzq//guGDkz1ybPLz3/hrSzySBD5YWaVtcqapTPGMxqSOcwjFD9AbY +# 5BYD0o6/0lXAIBQVLCI4elTZToeECLJkkerZA79OU9UJFL6cdrr5s6KENdLQkXIO +# o3M2KywJgUYUVK4v2mSeUzyahW3XW0+i5K03EPAlDi4ONFZZSE5l73er2SziU0go +# a8R5O6oYM6AAPmSBTX/6EpF1vb5fkPfOSI3nBe1TBlovGg3WvWQGn9Ft5B/kSq6F +# MXMUpngZ +# SIG # End signature block diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/FuzzySharp.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/FuzzySharp.dll new file mode 100644 index 000000000000..d25fb236c3e9 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/FuzzySharp.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Hyak.Common.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Hyak.Common.dll new file mode 100644 index 000000000000..18a53248894f Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Hyak.Common.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.ApplicationInsights.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.ApplicationInsights.dll new file mode 100644 index 000000000000..8ef5eef2989d Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.ApplicationInsights.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.Common.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.Common.dll new file mode 100644 index 000000000000..1c9d8e2a0ef5 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.Common.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AssemblyLoading.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AssemblyLoading.dll new file mode 100644 index 000000000000..38f5f8542077 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AssemblyLoading.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll new file mode 100644 index 000000000000..77cc1c46f5a7 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.Abstractions.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll new file mode 100644 index 000000000000..d8429b2b6881 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.ResourceManager.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.dll new file mode 100644 index 000000000000..1503a5b6d3ac Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authentication.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll new file mode 100644 index 000000000000..acc0eb23524f Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authenticators.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authenticators.dll new file mode 100644 index 000000000000..1d35ab395d17 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Authenticators.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Aks.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Aks.dll new file mode 100644 index 000000000000..3ab15df83c30 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Aks.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Authorization.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Authorization.dll new file mode 100644 index 000000000000..4b6131e2a0f6 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Authorization.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Compute.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Compute.dll new file mode 100644 index 000000000000..b5c2285f8237 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Compute.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll new file mode 100644 index 000000000000..afd56a7b9208 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Graph.Rbac.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.KeyVault.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.KeyVault.dll new file mode 100644 index 000000000000..b6838bea7093 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.KeyVault.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Monitor.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Monitor.dll new file mode 100644 index 000000000000..d28204acd31a Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Monitor.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Network.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Network.dll new file mode 100644 index 000000000000..b35c96f4c5cb Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Network.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll new file mode 100644 index 000000000000..3a37aeb3a3d5 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.PolicyInsights.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll new file mode 100644 index 000000000000..6b3270044fbc Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.ResourceManager.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll new file mode 100644 index 000000000000..eaa53e5a4ac9 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Storage.Management.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Websites.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Websites.dll new file mode 100644 index 000000000000..947ac62a5ac0 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Clients.Websites.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll new file mode 100644 index 000000000000..f2f380543ee1 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml new file mode 100644 index 000000000000..07d9948aca17 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Cmdlets.Accounts.dll-Help.xml @@ -0,0 +1,13631 @@ + + + + + Add-AzEnvironment + Add + AzEnvironment + + Adds endpoints and metadata for an instance of Azure Resource Manager. + + + + The Add-AzEnvironment cmdlet adds endpoints and metadata to enable Azure Resource Manager cmdlets to connect with a new instance of Azure Resource Manager. The built-in environments AzureCloud and AzureChinaCloud target existing public instances of Azure Resource Manager. + + + + Add-AzEnvironment + + Name + + Specifies the name of the environment to add. + + System.String + + System.String + + + None + + + PublishSettingsFileUrl + + Specifies the URL from which .publishsettings files can be downloaded. + + System.String + + System.String + + + None + + + AzureKeyVaultDnsSuffix + + Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net + + System.String + + System.String + + + None + + + AzureKeyVaultServiceEndpointResourceId + + Resource identifier of Azure Key Vault data service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + TrafficManagerDnsSuffix + + Specifies the domain-name suffix for Azure Traffic Manager services. + + System.String + + System.String + + + None + + + SqlDatabaseDnsSuffix + + Specifies the domain-name suffix for Azure SQL Database servers. + + System.String + + System.String + + + None + + + AzureDataLakeStoreFileSystemEndpointSuffix + + Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net + + System.String + + System.String + + + None + + + AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix + + Dns Suffix of Azure Data Lake Analytics job and catalog services + + System.String + + System.String + + + None + + + EnableAdfsAuthentication + + Indicates that Active Directory Federation Services (ADFS) on-premise authentication is allowed. + + + System.Management.Automation.SwitchParameter + + + False + + + AdTenant + + Specifies the default Active Directory tenant. + + System.String + + System.String + + + None + + + GraphAudience + + The audience for tokens authenticating with the AD Graph Endpoint. + + System.String + + System.String + + + None + + + DataLakeAudience + + The audience for tokens authenticating with the AD Data Lake services Endpoint. + + System.String + + System.String + + + None + + + ServiceEndpoint + + Specifies the endpoint for Service Management (RDFE) requests. + + System.String + + System.String + + + None + + + BatchEndpointResourceId + + The resource identifier of the Azure Batch service that is the recipient of the requested token + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpointResourceId + + The audience for tokens authenticating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpoint + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + ManagementPortalUrl + + Specifies the URL for the Management Portal. + + System.String + + System.String + + + None + + + StorageEndpoint + + Specifies the endpoint for storage (blob, table, queue, and file) access. + + System.String + + System.String + + + None + + + ActiveDirectoryEndpoint + + Specifies the base authority for Azure Active Directory authentication. + + System.String + + System.String + + + None + + + ResourceManagerEndpoint + + Specifies the URL for Azure Resource Manager requests. + + System.String + + System.String + + + None + + + GalleryEndpoint + + Specifies the endpoint for the Azure Resource Manager gallery of deployment templates. The parameter is to set the value to `GalleryUrl` of `PSAzureEnvironment`. As `GalleryUrl` is removed from ArmMetadata, Azure PowerShell will no longer provide for the value and so it is not recommended to set `GalleryEndpoint` anymore. + + System.String + + System.String + + + None + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management (RDFE) endpoints. + + System.String + + System.String + + + None + + + GraphEndpoint + + Specifies the URL for Graph (Active Directory metadata) requests. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointResourceId + + The resource identifier of the Azure Analysis Services resource. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointSuffix + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointResourceId + + The The resource identifier of the Azure Attestation service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointSuffix + + Dns suffix of Azure Attestation service. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointResourceId + + The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointSuffix + + Dns suffix of Azure Synapse Analytics. + + System.String + + System.String + + + None + + + ContainerRegistryEndpointSuffix + + Suffix of Azure Container Registry. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + MicrosoftGraphEndpointResourceId + + The resource identifier of Microsoft Graph + + System.String + + System.String + + + None + + + MicrosoftGraphUrl + + Microsoft Graph Url + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Add-AzEnvironment + + Name + + Specifies the name of the environment to add. + + System.String + + System.String + + + None + + + ARMEndpoint + + The Azure Resource Manager endpoint + + System.String + + System.String + + + None + + + AzureKeyVaultDnsSuffix + + Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net + + System.String + + System.String + + + None + + + AzureKeyVaultServiceEndpointResourceId + + Resource identifier of Azure Key Vault data service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + DataLakeAudience + + The audience for tokens authenticating with the AD Data Lake services Endpoint. + + System.String + + System.String + + + None + + + BatchEndpointResourceId + + The resource identifier of the Azure Batch service that is the recipient of the requested token + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpointResourceId + + The audience for tokens authenticating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpoint + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + StorageEndpoint + + Specifies the endpoint for storage (blob, table, queue, and file) access. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointResourceId + + The resource identifier of the Azure Analysis Services resource. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointSuffix + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointResourceId + + The The resource identifier of the Azure Attestation service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointSuffix + + Dns suffix of Azure Attestation service. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointResourceId + + The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointSuffix + + Dns suffix of Azure Synapse Analytics. + + System.String + + System.String + + + None + + + ContainerRegistryEndpointSuffix + + Suffix of Azure Container Registry. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Add-AzEnvironment + + AutoDiscover + + Discovers environments via default or configured endpoint. + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Uri + + Specifies URI of the internet resource to fetch environments. + + System.Uri + + System.Uri + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + ActiveDirectoryEndpoint + + Specifies the base authority for Azure Active Directory authentication. + + System.String + + System.String + + + None + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management (RDFE) endpoints. + + System.String + + System.String + + + None + + + AdTenant + + Specifies the default Active Directory tenant. + + System.String + + System.String + + + None + + + ARMEndpoint + + The Azure Resource Manager endpoint + + System.String + + System.String + + + None + + + AutoDiscover + + Discovers environments via default or configured endpoint. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + AzureAnalysisServicesEndpointResourceId + + The resource identifier of the Azure Analysis Services resource. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointSuffix + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointResourceId + + The The resource identifier of the Azure Attestation service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointSuffix + + Dns suffix of Azure Attestation service. + + System.String + + System.String + + + None + + + AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix + + Dns Suffix of Azure Data Lake Analytics job and catalog services + + System.String + + System.String + + + None + + + AzureDataLakeStoreFileSystemEndpointSuffix + + Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net + + System.String + + System.String + + + None + + + AzureKeyVaultDnsSuffix + + Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net + + System.String + + System.String + + + None + + + AzureKeyVaultServiceEndpointResourceId + + Resource identifier of Azure Key Vault data service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpoint + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpointResourceId + + The audience for tokens authenticating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointResourceId + + The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointSuffix + + Dns suffix of Azure Synapse Analytics. + + System.String + + System.String + + + None + + + BatchEndpointResourceId + + The resource identifier of the Azure Batch service that is the recipient of the requested token + + System.String + + System.String + + + None + + + ContainerRegistryEndpointSuffix + + Suffix of Azure Container Registry. + + System.String + + System.String + + + None + + + DataLakeAudience + + The audience for tokens authenticating with the AD Data Lake services Endpoint. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + EnableAdfsAuthentication + + Indicates that Active Directory Federation Services (ADFS) on-premise authentication is allowed. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + GalleryEndpoint + + Specifies the endpoint for the Azure Resource Manager gallery of deployment templates. The parameter is to set the value to `GalleryUrl` of `PSAzureEnvironment`. As `GalleryUrl` is removed from ArmMetadata, Azure PowerShell will no longer provide for the value and so it is not recommended to set `GalleryEndpoint` anymore. + + System.String + + System.String + + + None + + + GraphAudience + + The audience for tokens authenticating with the AD Graph Endpoint. + + System.String + + System.String + + + None + + + GraphEndpoint + + Specifies the URL for Graph (Active Directory metadata) requests. + + System.String + + System.String + + + None + + + ManagementPortalUrl + + Specifies the URL for the Management Portal. + + System.String + + System.String + + + None + + + MicrosoftGraphEndpointResourceId + + The resource identifier of Microsoft Graph + + System.String + + System.String + + + None + + + MicrosoftGraphUrl + + Microsoft Graph Url + + System.String + + System.String + + + None + + + Name + + Specifies the name of the environment to add. + + System.String + + System.String + + + None + + + PublishSettingsFileUrl + + Specifies the URL from which .publishsettings files can be downloaded. + + System.String + + System.String + + + None + + + ResourceManagerEndpoint + + Specifies the URL for Azure Resource Manager requests. + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + ServiceEndpoint + + Specifies the endpoint for Service Management (RDFE) requests. + + System.String + + System.String + + + None + + + SqlDatabaseDnsSuffix + + Specifies the domain-name suffix for Azure SQL Database servers. + + System.String + + System.String + + + None + + + StorageEndpoint + + Specifies the endpoint for storage (blob, table, queue, and file) access. + + System.String + + System.String + + + None + + + TrafficManagerDnsSuffix + + Specifies the domain-name suffix for Azure Traffic Manager services. + + System.String + + System.String + + + None + + + Uri + + Specifies URI of the internet resource to fetch environments. + + System.Uri + + System.Uri + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.String + + + + + + + + System.Management.Automation.SwitchParameter + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment + + + + + + + + + + + + + + ----- Example 1: Creating and modifying a new environment ----- + Add-AzEnvironment -Name TestEnvironment ` + -ActiveDirectoryEndpoint TestADEndpoint ` + -ActiveDirectoryServiceEndpointResourceId TestADApplicationId ` + -ResourceManagerEndpoint TestRMEndpoint ` + -GalleryEndpoint TestGalleryEndpoint ` + -GraphEndpoint TestGraphEndpoint + +Name Resource Manager Url ActiveDirectory Authority +---- -------------------- ------------------------- +TestEnvironment TestRMEndpoint TestADEndpoint/ + +Set-AzEnvironment -Name TestEnvironment ` + -ActiveDirectoryEndpoint NewTestADEndpoint ` + -GraphEndpoint NewTestGraphEndpoint | Format-List + +Name : TestEnvironment +EnableAdfsAuthentication : False +OnPremise : False +ActiveDirectoryServiceEndpointResourceId : TestADApplicationId +AdTenant : +GalleryUrl : TestGalleryEndpoint +ManagementPortalUrl : +ServiceManagementUrl : +PublishSettingsFileUrl : +ResourceManagerUrl : TestRMEndpoint +SqlDatabaseDnsSuffix : +StorageEndpointSuffix : +ActiveDirectoryAuthority : NewTestADEndpoint +GraphUrl : NewTestGraphEndpoint +GraphEndpointResourceId : +TrafficManagerDnsSuffix : +AzureKeyVaultDnsSuffix : +DataLakeEndpointResourceId : +AzureDataLakeStoreFileSystemEndpointSuffix : +AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix : +AzureKeyVaultServiceEndpointResourceId : +AzureOperationalInsightsEndpointResourceId : +AzureOperationalInsightsEndpoint : +AzureAnalysisServicesEndpointSuffix : +AzureAttestationServiceEndpointSuffix : +AzureAttestationServiceEndpointResourceId : +AzureSynapseAnalyticsEndpointSuffix : +AzureSynapseAnalyticsEndpointResourceId : +VersionProfiles : {} +ExtendedProperties : {} +BatchEndpointResourceId : + + In this example we are creating a new Azure environment with sample endpoints using Add-AzEnvironment, and then we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created environment using the cmdlet Set-AzEnvironment. + + + + + + ------- Example 2: Discovering a new environment via Uri ------- + <# +Uri https://configuredmetadata.net returns an array of environment metadata. The following example contains a payload for the AzureCloud default environment. + +[ + { + "portal": "https://portal.azure.com", + "authentication": { + "loginEndpoint": "https://login.microsoftonline.com/", + "audiences": [ + "https://management.core.windows.net/" + ], + "tenant": "common", + "identityProvider": "AAD" + }, + "media": "https://rest.media.azure.net", + "graphAudience": "https://graph.windows.net/", + "graph": "https://graph.windows.net/", + "name": "AzureCloud", + "suffixes": { + "azureDataLakeStoreFileSystem": "azuredatalakestore.net", + "acrLoginServer": "azurecr.io", + "sqlServerHostname": ".database.windows.net", + "azureDataLakeAnalyticsCatalogAndJob": "azuredatalakeanalytics.net", + "keyVaultDns": "vault.azure.net", + "storage": "core.windows.net", + "azureFrontDoorEndpointSuffix": "azurefd.net" + }, + "batch": "https://batch.core.windows.net/", + "resourceManager": "https://management.azure.com/", + "vmImageAliasDoc": "https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/arm-compute/quickstart-templates/aliases.json", + "activeDirectoryDataLake": "https://datalake.azure.net/", + "sqlManagement": "https://management.core.windows.net:8443/", + "gallery": "https://gallery.azure.com/" + }, +…… +] +#> + +Add-AzEnvironment -AutoDiscover -Uri https://configuredmetadata.net + +Name Resource Manager Url ActiveDirectory Authority +---- -------------------- ------------------------- +TestEnvironment TestRMEndpoint TestADEndpoint/ + + In this example, we are discovering a new Azure environment from the `https://configuredmetadata.net` Uri. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/add-azenvironment + + + Get-AzEnvironment + + + + Remove-AzEnvironment + + + + Set-AzEnvironment + + + + + + + Clear-AzConfig + Clear + AzConfig + + Clears the values of configs that are set by the user. + + + + Clears the values of configs that are set by the user. By default all the configs will be cleared. You can also specify keys of configs to clear. + + + + Clear-AzConfig + + AppliesTo + + Specifies what part of Azure PowerShell the config applies to. Possible values are: - "Az": the config applies to all modules and cmdlets of Azure PowerShell. + - Module name: the config applies to a certain module of Azure PowerShell. + For example, "Az.Storage". - Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell. For example, "Get-AzKeyVault". If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az". + + System.String + + System.String + + + None + + + CheckForUpgrade + + When enabled, Azure PowerShell will check for updates automatically and display a hint message when an update is available. The default value will be changed from false to true in Az version 11.0.0. + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + DefaultSubscriptionForLogin + + Subscription name or GUID. Sets the default context for Azure PowerShell when logging in without specifying a subscription. + + + System.Management.Automation.SwitchParameter + + + False + + + DisableErrorRecordsPersistence + + When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in in the next major release of Az around November 2023. + + + System.Management.Automation.SwitchParameter + + + False + + + DisplayBreakingChangeWarning + + Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release. + + + System.Management.Automation.SwitchParameter + + + False + + + DisplayRegionIdentified + + When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs. + + + System.Management.Automation.SwitchParameter + + + False + + + DisplaySurveyMessage + + When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell. + + + System.Management.Automation.SwitchParameter + + + False + + + EnableDataCollection + + When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experience. For more information, see our privacy statement: https://aka.ms/privacy + + + System.Management.Automation.SwitchParameter + + + False + + + EnableLoginByWam + + [Preview] When enabled, Web Account Manager (WAM) will be the default interactive login experience. It will fall back to using the browser if the platform does not support WAM. Note that this feature is under preview. Microsoft Account (MSA) is currently not supported. Feel free to reach out to Azure PowerShell team if you have any feedbacks: https://aka.ms/azpsissue + + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Returns true if cmdlet executes correctly. + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user. By default it is CurrentUser. + + + CurrentUser + Process + Default + Environment + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Clear-AzConfig + + AppliesTo + + Specifies what part of Azure PowerShell the config applies to. Possible values are: - "Az": the config applies to all modules and cmdlets of Azure PowerShell. + - Module name: the config applies to a certain module of Azure PowerShell. + For example, "Az.Storage". - Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell. For example, "Get-AzKeyVault". If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az". + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Do not ask for confirmation when clearing all configs. + + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Returns true if cmdlet executes correctly. + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user. By default it is CurrentUser. + + + CurrentUser + Process + Default + Environment + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + AppliesTo + + Specifies what part of Azure PowerShell the config applies to. Possible values are: - "Az": the config applies to all modules and cmdlets of Azure PowerShell. + - Module name: the config applies to a certain module of Azure PowerShell. + For example, "Az.Storage". - Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell. For example, "Get-AzKeyVault". If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az". + + System.String + + System.String + + + None + + + CheckForUpgrade + + When enabled, Azure PowerShell will check for updates automatically and display a hint message when an update is available. The default value will be changed from false to true in Az version 11.0.0. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + DefaultSubscriptionForLogin + + Subscription name or GUID. Sets the default context for Azure PowerShell when logging in without specifying a subscription. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisableErrorRecordsPersistence + + When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in in the next major release of Az around November 2023. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisplayBreakingChangeWarning + + Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisplayRegionIdentified + + When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisplaySurveyMessage + + When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + EnableDataCollection + + When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experience. For more information, see our privacy statement: https://aka.ms/privacy + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + EnableLoginByWam + + [Preview] When enabled, Web Account Manager (WAM) will be the default interactive login experience. It will fall back to using the browser if the platform does not support WAM. Note that this feature is under preview. Microsoft Account (MSA) is currently not supported. Feel free to reach out to Azure PowerShell team if you have any feedbacks: https://aka.ms/azpsissue + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Force + + Do not ask for confirmation when clearing all configs. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Returns true if cmdlet executes correctly. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user. By default it is CurrentUser. + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Clear-AzConfig -Force + + Clear all the configs. `-Force` suppresses the prompt for confirmation. + + + + + + -------------------------- Example 2 -------------------------- + Clear-AzConfig -EnableDataCollection + + Clear the "EnableDataCollection" config. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/clear-azconfig + + + + + + Clear-AzContext + Clear + AzContext + + Remove all Azure credentials, account, and subscription information. + + + + Remove all Azure Credentials, account, and subscription information. + + + + Clear-AzContext + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Delete all users and groups from the global scope without prompting + + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Return a value indicating success or failure + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Clear the context only for the current PowerShell session, or for all sessions. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Delete all users and groups from the global scope without prompting + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Return a value indicating success or failure + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Clear the context only for the current PowerShell session, or for all sessions. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + --------------- Example 1: Clear global context --------------- + Clear-AzContext -Scope CurrentUser + + Remove all account, subscription, and credential information for any powershell session. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/clear-azcontext + + + + + + Clear-AzDefault + Clear + AzDefault + + Clears the defaults set by the user in the current context. + + + + The Clear-AzDefault cmdlet removes the defaults set by the user depending on the switch parameters specified by the user. + + + + Clear-AzDefault + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Remove all defaults if no default is specified + + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + {{Fill PassThru Description}} + + + System.Management.Automation.SwitchParameter + + + False + + + ResourceGroup + + Clear Default Resource Group + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Remove all defaults if no default is specified + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + {{Fill PassThru Description}} + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + ResourceGroup + + Clear Default Resource Group + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.Management.Automation.SwitchParameter + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Clear-AzDefault + + This command removes all the defaults set by the user in the current context. + + + + + + -------------------------- Example 2 -------------------------- + Clear-AzDefault -ResourceGroup + + This command removes the default resource group set by the user in the current context. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/clear-azdefault + + + + + + Connect-AzAccount + Connect + AzAccount + + Connect to Azure with an authenticated account for use with cmdlets from the Az PowerShell modules. + + + + The `Connect-AzAccount` cmdlet connects to Azure with an authenticated account for use with cmdlets from the Az PowerShell modules. You can use this authenticated account only with Azure Resource Manager requests. To add an authenticated account for use with Service Management, use the `Add-AzureAccount` cmdlet from the Azure PowerShell module. If no context is found for the current user, the user's context list is populated with a context for each of their first 25 subscriptions. The list of contexts created for the user can be found by running `Get-AzContext -ListAvailable`. To skip this context population, specify the SkipContextPopulation switch parameter. After executing this cmdlet, you can disconnect from an Azure account using `Disconnect-AzAccount`. + + + + Connect-AzAccount + + AccessToken + + Specifies an access token. + > [!CAUTION] > Access tokens are a type of credential. You should take the appropriate security precautions to > keep them confidential. Access tokens also timeout and may prevent long running tasks from > completing. + + System.String + + System.String + + + None + + + AccountId + + Account Id / User Id / User Name to login with in Default (UserWithSubscriptionId) parameter set; Account ID for access token in AccessToken parameter set; Account ID for managed service in ManagedService parameter set. Can be a managed service resource ID, or the associated client ID. To use the system assigned identity, leave this field blank. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + GraphAccessToken + + AccessToken for Graph Service. + + System.String + + System.String + + + None + + + KeyVaultAccessToken + + AccessToken for KeyVault Service. + + System.String + + System.String + + + None + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + MicrosoftGraphAccessToken + + Access token to Microsoft Graph + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + SkipValidation + + Skip validation for access token. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Connect-AzAccount + + AccountId + + Account Id / User Id / User Name to login with in Default (UserWithSubscriptionId) parameter set; Account ID for access token in AccessToken parameter set; Account ID for managed service in ManagedService parameter set. Can be a managed service resource ID, or the associated client ID. To use the system assigned identity, leave this field blank. + + System.String + + System.String + + + None + + + AuthScope + + Optional OAuth scope for login, supported pre-defined values: AadGraph, AnalysisServices, Attestation, Batch, DataLake, KeyVault, OperationalInsights, Storage, Synapse. It also supports resource id like `https://storage.azure.com/`. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + UseDeviceAuthentication + + Use device code authentication instead of a browser control. + + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Connect-AzAccount + + AccountId + + Account Id / User Id / User Name to login with in Default (UserWithSubscriptionId) parameter set; Account ID for access token in AccessToken parameter set; Account ID for managed service in ManagedService parameter set. Can be a managed service resource ID, or the associated client ID. To use the system assigned identity, leave this field blank. + + System.String + + System.String + + + None + + + AuthScope + + Optional OAuth scope for login, supported pre-defined values: AadGraph, AnalysisServices, Attestation, Batch, DataLake, KeyVault, OperationalInsights, Storage, Synapse. It also supports resource id like `https://storage.azure.com/`. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + Identity + + Login using a Managed Service Identity. + + + System.Management.Automation.SwitchParameter + + + False + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Connect-AzAccount + + ApplicationId + + Application ID of the service principal. + + System.String + + System.String + + + None + + + AuthScope + + Optional OAuth scope for login, supported pre-defined values: AadGraph, AnalysisServices, Attestation, Batch, DataLake, KeyVault, OperationalInsights, Storage, Synapse. It also supports resource id like `https://storage.azure.com/`. + + System.String + + System.String + + + None + + + CertificateThumbprint + + Certificate Hash or Thumbprint. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SendCertificateChain + + Specifies if the x5c claim (public key of the certificate) should be sent to the STS to achieve easy certificate rollover in Azure AD. + + + System.Management.Automation.SwitchParameter + + + False + + + ServicePrincipal + + Indicates that this account authenticates by providing service principal credentials. + + + System.Management.Automation.SwitchParameter + + + False + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Connect-AzAccount + + ApplicationId + + Application ID of the service principal. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + FederatedToken + + Specifies a token provided by another identity provider. The issuer and subject in this token must be first configured to be trusted by the ApplicationId. + > [!CAUTION] > Federated tokens are a type of credential. You should take the appropriate security precautions to keep them confidential. Federated tokens also timeout and may prevent long running tasks from completing. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + ServicePrincipal + + Indicates that this account authenticates by providing service principal credentials. + + + System.Management.Automation.SwitchParameter + + + False + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Connect-AzAccount + + ApplicationId + + Application ID of the service principal. + + System.String + + System.String + + + None + + + CertificatePassword + + The password required to access the pkcs#12 certificate file. + + System.Security.SecureString + + System.Security.SecureString + + + None + + + CertificatePath + + The path of certficate file in pkcs#12 format. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SendCertificateChain + + Specifies if the x5c claim (public key of the certificate) should be sent to the STS to achieve easy certificate rollover in Azure AD. + + + System.Management.Automation.SwitchParameter + + + False + + + ServicePrincipal + + Indicates that this account authenticates by providing service principal credentials. + + + System.Management.Automation.SwitchParameter + + + False + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Connect-AzAccount + + AuthScope + + Optional OAuth scope for login, supported pre-defined values: AadGraph, AnalysisServices, Attestation, Batch, DataLake, KeyVault, OperationalInsights, Storage, Synapse. It also supports resource id like `https://storage.azure.com/`. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + Credential + + Specifies a PSCredential object. For more information about the PSCredential object, type `Get-Help Get-Credential`. The PSCredential object provides the user ID and password for organizational ID credentials, or the application ID and secret for service principal credentials. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + ServicePrincipal + + Indicates that this account authenticates by providing service principal credentials. + + + System.Management.Automation.SwitchParameter + + + False + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Connect-AzAccount + + AuthScope + + Optional OAuth scope for login, supported pre-defined values: AadGraph, AnalysisServices, Attestation, Batch, DataLake, KeyVault, OperationalInsights, Storage, Synapse. It also supports resource id like `https://storage.azure.com/`. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + Credential + + Specifies a PSCredential object. For more information about the PSCredential object, type `Get-Help Get-Credential`. The PSCredential object provides the user ID and password for organizational ID credentials, or the application ID and secret for service principal credentials. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + + System.Management.Automation.SwitchParameter + + + False + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SkipContextPopulation + + Skips context population if no contexts are found. + + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + AccessToken + + Specifies an access token. + > [!CAUTION] > Access tokens are a type of credential. You should take the appropriate security precautions to > keep them confidential. Access tokens also timeout and may prevent long running tasks from > completing. + + System.String + + System.String + + + None + + + AccountId + + Account Id / User Id / User Name to login with in Default (UserWithSubscriptionId) parameter set; Account ID for access token in AccessToken parameter set; Account ID for managed service in ManagedService parameter set. Can be a managed service resource ID, or the associated client ID. To use the system assigned identity, leave this field blank. + + System.String + + System.String + + + None + + + ApplicationId + + Application ID of the service principal. + + System.String + + System.String + + + None + + + AuthScope + + Optional OAuth scope for login, supported pre-defined values: AadGraph, AnalysisServices, Attestation, Batch, DataLake, KeyVault, OperationalInsights, Storage, Synapse. It also supports resource id like `https://storage.azure.com/`. + + System.String + + System.String + + + None + + + CertificatePassword + + The password required to access the pkcs#12 certificate file. + + System.Security.SecureString + + System.Security.SecureString + + + None + + + CertificatePath + + The path of certficate file in pkcs#12 format. + + System.String + + System.String + + + None + + + CertificateThumbprint + + Certificate Hash or Thumbprint. + + System.String + + System.String + + + None + + + ContextName + + Name of the default Azure context for this login. For more information about Azure contexts, see Azure PowerShell context objects (/powershell/azure/context-persistence). + + System.String + + System.String + + + None + + + Credential + + Specifies a PSCredential object. For more information about the PSCredential object, type `Get-Help Get-Credential`. The PSCredential object provides the user ID and password for organizational ID credentials, or the application ID and secret for service principal credentials. + + System.Management.Automation.PSCredential + + System.Management.Automation.PSCredential + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Environment + + Environment containing the Azure account. + + System.String + + System.String + + + None + + + FederatedToken + + Specifies a token provided by another identity provider. The issuer and subject in this token must be first configured to be trusted by the ApplicationId. + > [!CAUTION] > Federated tokens are a type of credential. You should take the appropriate security precautions to keep them confidential. Federated tokens also timeout and may prevent long running tasks from completing. + + System.String + + System.String + + + None + + + Force + + Overwrite the existing context with the same name without prompting. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + GraphAccessToken + + AccessToken for Graph Service. + + System.String + + System.String + + + None + + + Identity + + Login using a Managed Service Identity. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + KeyVaultAccessToken + + AccessToken for KeyVault Service. + + System.String + + System.String + + + None + + + MaxContextPopulation + + Max subscription number to populate contexts after login. Default is 25. To populate all subscriptions to contexts, set to -1. + + System.Int32 + + System.Int32 + + + None + + + MicrosoftGraphAccessToken + + Access token to Microsoft Graph + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SendCertificateChain + + Specifies if the x5c claim (public key of the certificate) should be sent to the STS to achieve easy certificate rollover in Azure AD. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + ServicePrincipal + + Indicates that this account authenticates by providing service principal credentials. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + SkipContextPopulation + + Skips context population if no contexts are found. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + SkipValidation + + Skip validation for access token. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Subscription + + Subscription Name or ID. + + System.String + + System.String + + + None + + + Tenant + + Optional tenant name or ID. + > [!NOTE] > Due to limitations of the current API, you must use a tenant ID instead of a tenant name when > connecting with a business-to-business (B2B) account. + + System.String + + System.String + + + None + + + UseDeviceAuthentication + + Use device code authentication instead of a browser control. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.String + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile + + + + + + + + + + + + + + ------------ Example 1: Connect to an Azure account ------------ + Connect-AzAccount + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + + + + + + + Example 2: Connect to Azure using organizational ID credentials + $Credential = Get-Credential +Connect-AzAccount -Credential $Credential + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + + + + + + + Example 3: Connect to Azure using a service principal account + $SecurePassword = ConvertTo-SecureString -String "Password123!" -AsPlainText -Force +$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy' +$ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz' +$Credential = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $ApplicationId, $SecurePassword +Connect-AzAccount -ServicePrincipal -TenantId $TenantId -Credential $Credential + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +xxxx-xxxx-xxxx-xxxx Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + + + + + + + Example 4: Use an interactive login to connect to a specific tenant and subscription + Connect-AzAccount -Tenant 'xxxx-xxxx-xxxx-xxxx' -SubscriptionId 'yyyy-yyyy-yyyy-yyyy' + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + + + + + + + ----- Example 5: Connect using a Managed Service Identity ----- + Connect-AzAccount -Identity +Set-AzContext -Subscription Subscription1 + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +MSI@50342 Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + + + + + + + Example 6: Connect using Managed Service Identity login and ClientId + $identity = Get-AzUserAssignedIdentity -ResourceGroupName 'myResourceGroup' -Name 'myUserAssignedIdentity' +Get-AzVM -ResourceGroupName contoso -Name testvm | Update-AzVM -IdentityType UserAssigned -IdentityId $identity.Id +Connect-AzAccount -Identity -AccountId $identity.ClientId # Run on the virtual machine + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +yyyy-yyyy-yyyy-yyyy Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + + + + + + + ------------ Example 7: Connect using certificates ------------ + $Thumbprint = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' +$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy' +$ApplicationId = '00000000-0000-0000-0000-00000000' +Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ApplicationId -Tenant $TenantId -ServicePrincipal + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +xxxxxxxx-xxxx-xxxx-xxxxxxxxx Subscription1 yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy AzureCloud + +Account : xxxxxxxx-xxxx-xxxx-xxxxxxxx +SubscriptionName : MyTestSubscription +SubscriptionId : zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz +TenantId : yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy +Environment : AzureCloud + + + + + + + + -------------- Example 8: Connect with AuthScope -------------- + Connect-AzAccount -AuthScope Storage + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +yyyy-yyyy-yyyy-yyyy Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + + + + + + + ---------- Example 9: Connect using certificate file ---------- + $SecurePassword = ConvertTo-SecureString -String "Password123!" -AsPlainText -Force +$TenantId = 'yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy' +$ApplicationId = 'zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzz' +Connect-AzAccount -ServicePrincipal -ApplicationId $ApplicationId -TenantId $TenantId -CertificatePath './certificatefortest.pfx' -CertificatePassword $securePassword + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +xxxxxxxx-xxxx-xxxx-xxxxxxxx Subscription1 yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy AzureCloud + + + + + + + + --------- Example 10: Connect interactively using WAM --------- + Update-AzConfig -EnableLoginByWam $true +Connect-AzAccount + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +xxxxxxxx-xxxx-xxxx-xxxxxxxx Subscription1 yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyy AzureCloud + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/connect-azaccount + + + + + + Disable-AzContextAutosave + Disable + AzContextAutosave + + Turn off autosaving Azure credentials. Your login information will be forgotten the next time you open a PowerShell window + + + + Turn off autosaving Azure credentials. Your login information will be forgotten the next time you open a PowerShell window + + + + Disable-AzContextAutosave + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + Microsoft.Azure.Commands.Common.Authentication.ContextAutosaveSettings + + + + + + + + + + + + + + ---------- Example 1: Disable autosaving the context ---------- + Disable-AzContextAutosave + + Disable autosave for the current user. + + + + + + -------------------------- Example 2 -------------------------- + Disable-AzContextAutosave -Scope Process + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/disable-azcontextautosave + + + + + + Disable-AzDataCollection + Disable + AzDataCollection + + Opts out of collecting data to improve the Azure PowerShell cmdlets. Data is collected by default unless you explicitly opt out. + + + + The `Disable-AzDataCollection` cmdlet is used to opt out of data collection. Azure PowerShell automatically collects telemetry data by default. To disable data collection, you must explicitly opt-out. Microsoft aggregates collected data to identify patterns of usage, to identify common issues, and to improve the experience of Azure PowerShell. Microsoft Azure PowerShell doesn't collect any private or personal data. If you've previously opted out, run the `Enable-AzDataCollection` cmdlet to re-enable data collection for the current user on the current machine. + + + + Disable-AzDataCollection + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Void + + + + + + + + + + + + + + -- Example 1: Disabling data collection for the current user -- + Disable-AzDataCollection + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/disable-azdatacollection + + + Enable-AzDataCollection + + + + + + + Disable-AzureRmAlias + Disable + AzureRmAlias + + Disables AzureRm prefix aliases for Az modules. + + + + Disables AzureRm prefix aliases for Az modules. If -Module is specified, only modules listed will have aliases disabled. Otherwise all AzureRm aliases are disabled. + + + + Disable-AzureRmAlias + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Module + + Indicates which modules to disable aliases for. If none are specified, default is all enabled modules. + + System.String[] + + System.String[] + + + None + + + PassThru + + If specified, cmdlet will return all disabled aliases + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Indicates what scope aliases should be disabled for. Default is 'Process' + + + Process + CurrentUser + LocalMachine + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Module + + Indicates which modules to disable aliases for. If none are specified, default is all enabled modules. + + System.String[] + + System.String[] + + + None + + + PassThru + + If specified, cmdlet will return all disabled aliases + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Indicates what scope aliases should be disabled for. Default is 'Process' + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.String + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Disable-AzureRmAlias + + Disables all AzureRm prefixes for the current PowerShell session. + + + + + + -------------------------- Example 2 -------------------------- + Disable-AzureRmAlias -Module Az.Accounts -Scope CurrentUser + + Disables AzureRm aliases for the Az.Accounts module for both the current process and for the current user. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/disable-azurermalias + + + + + + Disconnect-AzAccount + Disconnect + AzAccount + + Disconnects a connected Azure account and removes all credentials and contexts associated with that account. + + + + The Disconnect-AzAccount cmdlet disconnects a connected Azure account and removes all credentials and contexts (subscription and tenant information) associated with that account. After executing this cmdlet, you will need to login again using Connect-AzAccount. + + + + Disconnect-AzAccount + + ApplicationId + + ServicePrincipal id (globally unique id) + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + TenantId + + Tenant id (globally unique id) + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not executed. + + + System.Management.Automation.SwitchParameter + + + False + + + + Disconnect-AzAccount + + AzureContext + + Context + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not executed. + + + System.Management.Automation.SwitchParameter + + + False + + + + Disconnect-AzAccount + + ContextName + + Name of the context to log out of + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not executed. + + + System.Management.Automation.SwitchParameter + + + False + + + + Disconnect-AzAccount + + InputObject + + The account object to remove + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not executed. + + + System.Management.Automation.SwitchParameter + + + False + + + + Disconnect-AzAccount + + Username + + User name of the form 'user@contoso.org' + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not executed. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + ApplicationId + + ServicePrincipal id (globally unique id) + + System.String + + System.String + + + None + + + AzureContext + + Context + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + ContextName + + Name of the context to log out of + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + InputObject + + The account object to remove + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + TenantId + + Tenant id (globally unique id) + + System.String + + System.String + + + None + + + Username + + User name of the form 'user@contoso.org' + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not executed. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureRmAccount + + + + + + + + + + + + + + ----------- Example 1: Logout of the current account ----------- + Disconnect-AzAccount + + Logs out of the Azure account associated with the current context. + + + + + + Example 2: Logout of the account associated with a particular context + Get-AzContext "Work" | Disconnect-AzAccount -Scope CurrentUser + + Logs out the account associated with the given context (named 'Work'). Because this uses the 'CurrentUser' scope, all credentials and contexts will be permanently deleted. + + + + + + ------------- Example 3: Log out a particular user ------------- + Disconnect-AzAccount -Username 'user1@contoso.org' + + Logs out the 'user1@contoso.org' user - all credentials and all contexts associated with this user will be removed. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/disconnect-azaccount + + + + + + Enable-AzContextAutosave + Enable + AzContextAutosave + + Azure contexts are PowerShell objects representing your active subscription to run commands against, and the authentication information needed to connect to an Azure cloud. With Azure contexts, Azure PowerShell doesn't need to reauthenticate your account each time you switch subscriptions. For more information, see Azure PowerShell context objects (https://learn.microsoft.com/powershell/azure/context-persistence). + This cmdlet allows the Azure context information to be saved and automatically loaded when you start a PowerShell process. For example, when opening a new window. + + + + Allows the Azure context information to be saved and automatically loaded when a PowerShell process starts. The context is saved at the end of the execution of any cmdlet that affects the context. For example, any profile cmdlet. If you're using user authentication, then tokens can be updated during the course of running any cmdlet. + + + + Enable-AzContextAutosave + + DefaultProfile + + The credentials, tenant, and subscription used for communication with Azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes. For example, whether changes apply only to the current process, or to all sessions started by this user. Changes made with the scope `CurrentUser` will affect all PowerShell sessions started by the user. If a particular session needs to have different settings, use the scope `Process`. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + CurrentUser + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet isn't run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with Azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes. For example, whether changes apply only to the current process, or to all sessions started by this user. Changes made with the scope `CurrentUser` will affect all PowerShell sessions started by the user. If a particular session needs to have different settings, use the scope `Process`. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + CurrentUser + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet isn't run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + Microsoft.Azure.Commands.Common.Authentication.ContextAutosaveSettings + + + + + + + + + + + + + + Example 1: Enable autosaving credentials for the current user + Enable-AzContextAutosave + + + + + + + + -------------------------- Example 2 -------------------------- + Enable-AzContextAutosave -Scope Process + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/enable-azcontextautosave + + + + + + Enable-AzDataCollection + Enable + AzDataCollection + + Enables Azure PowerShell to collect data to improve the user experience with the Azure PowerShell cmdlets. Executing this cmdlet opts in to data collection for the current user on the current machine. Data is collected by default unless you explicitly opt out. + + + + The `Enable-AzDataCollection` cmdlet is used to opt in to data collection. Azure PowerShell automatically collects telemetry data by default. Microsoft aggregates collected data to identify patterns of usage, to identify common issues, and to improve the experience of Azure PowerShell. Microsoft Azure PowerShell doesn't collect any private or personal data. To disable data collection, you must explicitly opt out by executing `Disable-AzDataCollection`. + + + + Enable-AzDataCollection + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Void + + + + + + + + + + + + + + --- Example 1: Enabling data collection for the current user --- + Enable-AzDataCollection + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/enable-azdatacollection + + + Disable-AzDataCollection + + + + + + + Enable-AzureRmAlias + Enable + AzureRmAlias + + Enables AzureRm prefix aliases for Az modules. + + + + Enables AzureRm prefix aliases for Az modules. If -Module is specified, only modules listed will have aliases enabled. Otherwise all AzureRm aliases are enabled. + + + + Enable-AzureRmAlias + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Module + + Indicates which modules to enable aliases for. If none are specified, default is all modules. + + System.String[] + + System.String[] + + + None + + + PassThru + + If specified, cmdlet will return all aliases enabled + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Indicates what scope aliases should be enabled for. Default is 'Local' + + + Local + Process + CurrentUser + LocalMachine + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Module + + Indicates which modules to enable aliases for. If none are specified, default is all modules. + + System.String[] + + System.String[] + + + None + + + PassThru + + If specified, cmdlet will return all aliases enabled + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Indicates what scope aliases should be enabled for. Default is 'Local' + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.String + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Enable-AzureRmAlias + + Enables all AzureRm prefixes for the current PowerShell session. + + + + + + -------------------------- Example 2 -------------------------- + Enable-AzureRmAlias -Module Az.Accounts -Scope CurrentUser + + Enables AzureRm aliases for the Az.Accounts module for both the current process and for the current user. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/enable-azurermalias + + + + + + Export-AzConfig + Export + AzConfig + + Exports all the configs into a file so that it can be imported on another machine. + + + + The `Export-AzConfig` cmdlet exports all the configs that are set at the "CurrentUser" scope into a file at given path in JSON format. The file can then be imported by `Import-AzConfig` for example on another machine. + + + + Export-AzConfig + + Path + + Specifies the path of the file to which to save the configs. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Overwrites the given file if it exists. + + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Returns a boolean value indicating success or failure. + + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Overwrites the given file if it exists. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Returns a boolean value indicating success or failure. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Path + + Specifies the path of the file to which to save the configs. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Export-AzConfig -Path ./config.json + + This example exports the configs to `./config.json` file which can later be imported via `Import-AzConfig`. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/export-azconfig + + + Import-AzConfig + + + + + + + Get-AzAccessToken + Get + AzAccessToken + + Get raw access token. When using -ResourceUrl, please make sure the value does match current Azure environment. You may refer to the value of `(Get-AzContext).Environment`. + + + + Get access token + + + + Get-AzAccessToken + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + IAzureContextContainer + + IAzureContextContainer + + + None + + + ResourceTypeName + + Optional resource type name, supported values: AadGraph, AnalysisServices, AppConfiguration, Arm, Attestation, Batch, DataLake, KeyVault, MSGraph, OperationalInsights, ResourceManager, Storage, Synapse. Default value is Arm if not specified. + + String + + String + + + None + + + TenantId + + Optional Tenant Id. Use tenant id of default context if not specified. + + String + + String + + + None + + + + Get-AzAccessToken + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + IAzureContextContainer + + IAzureContextContainer + + + None + + + ResourceUrl + + Resource url for that you're requesting token, e.g. 'https://graph.microsoft.com/'. + + String + + String + + + None + + + TenantId + + Optional Tenant Id. Use tenant id of default context if not specified. + + String + + String + + + None + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + IAzureContextContainer + + IAzureContextContainer + + + None + + + ResourceTypeName + + Optional resource type name, supported values: AadGraph, AnalysisServices, AppConfiguration, Arm, Attestation, Batch, DataLake, KeyVault, MSGraph, OperationalInsights, ResourceManager, Storage, Synapse. Default value is Arm if not specified. + + String + + String + + + None + + + ResourceUrl + + Resource url for that you're requesting token, e.g. 'https://graph.microsoft.com/'. + + String + + String + + + None + + + TenantId + + Optional Tenant Id. Use tenant id of default context if not specified. + + String + + String + + + None + + + + + + None + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAccessToken + + + + + + + + + + + + + + ------- Example 1 Get the access token for ARM endpoint ------- + Get-AzAccessToken + + Get access token of current account for ResourceManager endpoint + + + + + + - Example 2 Get the access token for Microsoft Graph endpoint - + Get-AzAccessToken -ResourceTypeName MSGraph + + Get access token of Microsoft Graph endpoint for current account + + + + + + - Example 3 Get the access token for Microsoft Graph endpoint - + Get-AzAccessToken -ResourceUrl "https://graph.microsoft.com/" + + Get access token of Microsoft Graph endpoint for current account + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-azaccesstoken + + + + + + Get-AzConfig + Get + AzConfig + + Gets the configs of Azure PowerShell. + + + + Gets the configs of Azure PowerShell. By default it lists all the configs. You can filter the result using various parameters. + > [!NOTE] > Configs have priorities. Generally speaking, Process scope has higher priority than CurrentUser scope; a config that applies to a certain cmdlet has higher priority than that applies to a module, again higher than Az. > To reduce confusion, the result of `Get-AzConfig` shows those configs that are taking effect. It is a combination of all the configs, but not literally all the configs. However, you could always view them by applying different filter parameters, such as `-Scope`. + + + + Get-AzConfig + + AppliesTo + + Specifies what part of Azure PowerShell the config applies to. Possible values are: - "Az": the config applies to all modules and cmdlets of Azure PowerShell. + - Module name: the config applies to a certain module of Azure PowerShell. + For example, "Az.Storage". - Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell. For example, "Get-AzKeyVault". If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az". + + System.String + + System.String + + + None + + + CheckForUpgrade + + When enabled, Azure PowerShell will check for updates automatically and display a hint message when an update is available. The default value will be changed from false to true in Az version 11.0.0. + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + DefaultSubscriptionForLogin + + Subscription name or GUID. Sets the default context for Azure PowerShell when logging in without specifying a subscription. + + + System.Management.Automation.SwitchParameter + + + False + + + DisableErrorRecordsPersistence + + When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in in the next major release of Az around November 2023. + + + System.Management.Automation.SwitchParameter + + + False + + + DisplayBreakingChangeWarning + + Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release. + + + System.Management.Automation.SwitchParameter + + + False + + + DisplayRegionIdentified + + When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs. + + + System.Management.Automation.SwitchParameter + + + False + + + DisplaySurveyMessage + + When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell. + + + System.Management.Automation.SwitchParameter + + + False + + + EnableDataCollection + + When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experience. For more information, see our privacy statement: https://aka.ms/privacy + + + System.Management.Automation.SwitchParameter + + + False + + + EnableLoginByWam + + [Preview] When enabled, Web Account Manager (WAM) will be the default interactive login experience. It will fall back to using the browser if the platform does not support WAM. Note that this feature is under preview. Microsoft Account (MSA) is currently not supported. Feel free to reach out to Azure PowerShell team if you have any feedbacks: https://aka.ms/azpsissue + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user. By default it is CurrentUser. + + + CurrentUser + Process + Default + Environment + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + + None + + + + + + AppliesTo + + Specifies what part of Azure PowerShell the config applies to. Possible values are: - "Az": the config applies to all modules and cmdlets of Azure PowerShell. + - Module name: the config applies to a certain module of Azure PowerShell. + For example, "Az.Storage". - Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell. For example, "Get-AzKeyVault". If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az". + + System.String + + System.String + + + None + + + CheckForUpgrade + + When enabled, Azure PowerShell will check for updates automatically and display a hint message when an update is available. The default value will be changed from false to true in Az version 11.0.0. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + DefaultSubscriptionForLogin + + Subscription name or GUID. Sets the default context for Azure PowerShell when logging in without specifying a subscription. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisableErrorRecordsPersistence + + When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in in the next major release of Az around November 2023. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisplayBreakingChangeWarning + + Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisplayRegionIdentified + + When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DisplaySurveyMessage + + When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + EnableDataCollection + + When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experience. For more information, see our privacy statement: https://aka.ms/privacy + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + EnableLoginByWam + + [Preview] When enabled, Web Account Manager (WAM) will be the default interactive login experience. It will fall back to using the browser if the platform does not support WAM. Note that this feature is under preview. Microsoft Account (MSA) is currently not supported. Feel free to reach out to Azure PowerShell team if you have any feedbacks: https://aka.ms/azpsissue + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user. By default it is CurrentUser. + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + + None + + + + + + None + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSConfig + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Get-AzConfig + +Key Value Applies To Scope Help Message +--- ----- ---------- ----- ------------ +EnableDataCollection False Az CurrentUser When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the custom… +DefaultSubscriptionForLogin Az Default Subscription name or GUID. Sets the default context for Azure PowerShell when logging in with… +DisplayBreakingChangeWarning True Az Default Controls if warning messages for breaking changes are displayed or suppressed. When enabled, … + + Gets all the configs. + + + + + + -------------------------- Example 2 -------------------------- + Get-AzConfig -EnableDataCollection + +Key Value Applies To Scope Help Message +--- ----- ---------- ----- ------------ +EnableDataCollection False Az CurrentUser When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the custom… + + Gets the "EnableDataCollection" config. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-azconfig + + + + + + Get-AzContext + Get + AzContext + + Gets the metadata used to authenticate Azure Resource Manager requests. + + + + The Get-AzContext cmdlet gets the current metadata used to authenticate Azure Resource Manager requests. This cmdlet gets the Active Directory account, Active Directory tenant, Azure subscription, and the targeted Azure environment. Azure Resource Manager cmdlets use these settings by default when making Azure Resource Manager requests. When the available amount of subscription exceeds the default limit of 25, some subscriptions may not show up in the results of `Get-AzContext -ListAvailable`. Please run `Connect-AzAccount -MaxContextPopulation <int>` to get more contexts. + + + + Get-AzContext + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ListAvailable + + List all available contexts in the current session. + + + System.Management.Automation.SwitchParameter + + + False + + + RefreshContextFromTokenCache + + Refresh contexts from token cache + + + System.Management.Automation.SwitchParameter + + + False + + + + Get-AzContext + + Name + + The name of the context + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ListAvailable + + List all available contexts in the current session. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Name + + The name of the context + + System.String + + System.String + + + None + + + RefreshContextFromTokenCache + + Refresh contexts from token cache + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + + + + + ------------ Example 1: Getting the current context ------------ + Connect-AzAccount +Get-AzContext + +Name Account SubscriptionName Environment TenantId +---- ------- ---------------- ----------- -------- +Subscription1 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription1 AzureCloud xxxxxxxx-x... + + In this example we are logging into our account with an Azure subscription using Connect-AzAccount, and then we are getting the context of the current session by calling Get-AzContext. + + + + + + ---------- Example 2: Listing all available contexts ---------- + Get-AzContext -ListAvailable + +Name Account SubscriptionName Environment TenantId +---- ------- ---------------- ----------- -------- +Subscription1 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription1 AzureCloud xxxxxxxx-x... +Subscription2 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription2 AzureCloud xxxxxxxx-x... +Subscription3 (xxxxxxxx-xxxx-xxxx-xxx... test@outlook.com Subscription3 AzureCloud xxxxxxxx-x... + + In this example, all currently available contexts are displayed. The user may select one of these contexts using Select-AzContext. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-azcontext + + + Set-AzContext + + + + Connect-AzAccount + + + + + + + Get-AzContextAutosaveSetting + Get + AzContextAutosaveSetting + + Display metadata about the context autosave feature, including whether the context is automatically saved, and where saved context and credential information can be found. + + + + Display metadata about the context autosave feature, including whether the context is automatically saved, and where saved context and credential information can be found. + + + + Get-AzContextAutosaveSetting + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + + + + None + + + + + + + + + + Microsoft.Azure.Commands.Common.Authentication.ContextAutosaveSettings + + + + + + + + + + + + + + ------ Get context save metadata for the current session ------ + Get-AzContextAutosaveSetting + +Mode : Process +ContextDirectory : None +ContextFile : None +CacheDirectory : None +CacheFile : None +Settings : {} + + Get details about whether and where the context is saved. In the above example, the autosave feature has been disabled. + + + + + + -------- Get context save metadata for the current user -------- + Get-AzContextAutosaveSetting -Scope CurrentUser + +Mode : CurrentUser +ContextDirectory : C:\Users\contoso\AppData\Roaming\Windows Azure Powershell +ContextFile : AzureRmContext.json +CacheDirectory : C:\Users\contoso\AppData\Roaming\Windows Azure Powershell +CacheFile : TokenCache.dat +Settings : {} + + Get details about whether and where the context is saved by default for the current user. Note that this may be different than the settings that are active in the current session. In the above example, the autosave feature has been enabled, and data is saved to the default location. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-azcontextautosavesetting + + + + + + Get-AzDefault + Get + AzDefault + + Get the defaults set by the user in the current context. + + + + The Get-AzDefault cmdlet gets the Resource Group that the user has set as default in the current context. + + + + Get-AzDefault + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ResourceGroup + + Display Default Resource Group + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ResourceGroup + + Display Default Resource Group + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.Management.Automation.SwitchParameter + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSResourceGroup + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Get-AzDefault + +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup +Name : myResourceGroup +Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties +Location : eastus +ManagedBy : +Tags : + + This command returns the current defaults if there are defaults set, or returns nothing if no default is set. + + + + + + -------------------------- Example 2 -------------------------- + Get-AzDefault -ResourceGroup + +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup +Name : myResourceGroup +Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties +Location : eastus +ManagedBy : +Tags : + + This command returns the current default Resource Group if there is a default set, or returns nothing if no default is set. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-azdefault + + + + + + Get-AzEnvironment + Get + AzEnvironment + + Get endpoints and metadata for an instance of Azure services. `GalleryUrl` will be removed from ArmMetadata and so Azure PowerShell will no longer provide for its value in `PSAzureEnvironment`. Currently `GalleryUrl` is not used in Azure PowerShell products. Please do not reply on `GalleryUrl` anymore. + + + + The Get-AzEnvironment cmdlet gets endpoints and metadata for an instance of Azure services. + + + + Get-AzEnvironment + + Name + + Specifies the name of the Azure instance to get. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Name + + Specifies the name of the Azure instance to get. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment + + + + + + + + + + + + + + ---------- Example 1: Getting all Azure environments ---------- + Get-AzEnvironment + +Name Resource Manager Url ActiveDirectory Authority Type +---- -------------------- ------------------------- ---- +AzureUSGovernment https://management.usgovcloudapi.net/ https://login.microsoftonline.us/ Built-in +AzureCloud https://management.azure.com/ https://login.microsoftonline.com/ Built-in +AzureChinaCloud https://management.chinacloudapi.cn/ https://login.chinacloudapi.cn/ Built-in + + This example shows how to get the endpoints and metadata for the AzureCloud (default) environment. + + + + + + -------- Example 2: Getting the AzureCloud environment -------- + Get-AzEnvironment -Name AzureCloud + +Name Resource Manager Url ActiveDirectory Authority Type +---- -------------------- ------------------------- ---- +AzureCloud https://management.azure.com/ https://login.microsoftonline.com/ Built-in + + This example shows how to get the endpoints and metadata for the AzureCloud (default) environment. + + + + + + ------ Example 3: Getting the AzureChinaCloud environment ------ + Get-AzEnvironment -Name AzureChinaCloud | Format-List + +Name : AzureChinaCloud +Type : Built-in +EnableAdfsAuthentication : False +OnPremise : False +ActiveDirectoryServiceEndpointResourceId : https://management.core.chinacloudapi.cn/ +AdTenant : Common +GalleryUrl : https://gallery.azure.com/ +ManagementPortalUrl : https://go.microsoft.com/fwlink/?LinkId=301902 +ServiceManagementUrl : https://management.core.chinacloudapi.cn/ +PublishSettingsFileUrl : https://go.microsoft.com/fwlink/?LinkID=301776 +ResourceManagerUrl : https://management.chinacloudapi.cn/ +SqlDatabaseDnsSuffix : .database.chinacloudapi.cn +StorageEndpointSuffix : core.chinacloudapi.cn +ActiveDirectoryAuthority : https://login.chinacloudapi.cn/ +GraphUrl : https://graph.chinacloudapi.cn/ +GraphEndpointResourceId : https://graph.chinacloudapi.cn/ +TrafficManagerDnsSuffix : trafficmanager.cn +AzureKeyVaultDnsSuffix : vault.azure.cn +DataLakeEndpointResourceId : +AzureDataLakeStoreFileSystemEndpointSuffix : +AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix : +AzureKeyVaultServiceEndpointResourceId : https://vault.azure.cn +ContainerRegistryEndpointSuffix : azurecr.cn +AzureOperationalInsightsEndpointResourceId : +AzureOperationalInsightsEndpoint : +AzureAnalysisServicesEndpointSuffix : asazure.chinacloudapi.cn +AnalysisServicesEndpointResourceId : https://region.asazure.chinacloudapi.cn +AzureAttestationServiceEndpointSuffix : +AzureAttestationServiceEndpointResourceId : +AzureSynapseAnalyticsEndpointSuffix : dev.azuresynapse.azure.cn +AzureSynapseAnalyticsEndpointResourceId : https://dev.azuresynapse.azure.cn + + This example shows how to get the endpoints and metadata for the AzureChinaCloud environment. + + + + + + ----- Example 4: Getting the AzureUSGovernment environment ----- + Get-AzEnvironment -Name AzureUSGovernment + +Name Resource Manager Url ActiveDirectory Authority Type +---- -------------------- ------------------------- ---- +AzureUSGovernment https://management.usgovcloudapi.net/ https://login.microsoftonline.us/ Built-in + + This example shows how to get the endpoints and metadata for the AzureUSGovernment environment. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-azenvironment + + + Add-AzEnvironment + + + + Remove-AzEnvironment + + + + Set-AzEnvironment + + + + + + + Get-AzSubscription + Get + AzSubscription + + Get subscriptions that the current account can access. + + + + The Get-AzSubscription cmdlet gets the subscription ID, subscription name, and home tenant for subscriptions that the current account can access. + + + + Get-AzSubscription + + AsJob + + Run cmdlet in the background and return a Job to track progress. + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + SubscriptionId + + Specifies the ID of the subscription to get. + + System.String + + System.String + + + None + + + TenantId + + Specifies the ID of the tenant that contains subscriptions to get. + + System.String + + System.String + + + None + + + + Get-AzSubscription + + AsJob + + Run cmdlet in the background and return a Job to track progress. + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + SubscriptionName + + Specifies the name of the subscription to get. + + System.String + + System.String + + + None + + + TenantId + + Specifies the ID of the tenant that contains subscriptions to get. + + System.String + + System.String + + + None + + + + + + AsJob + + Run cmdlet in the background and return a Job to track progress. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + SubscriptionId + + Specifies the ID of the subscription to get. + + System.String + + System.String + + + None + + + SubscriptionName + + Specifies the name of the subscription to get. + + System.String + + System.String + + + None + + + TenantId + + Specifies the ID of the tenant that contains subscriptions to get. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + + + + + + + + + + + + + ------- Example 1: Get all subscriptions in all tenants ------- + Get-AzSubscription + +Name Id TenantId State +---- -- -------- ----- +Subscription1 yyyy-yyyy-yyyy-yyyy aaaa-aaaa-aaaa-aaaa Enabled +Subscription2 xxxx-xxxx-xxxx-xxxx aaaa-aaaa-aaaa-aaaa Enabled +Subscription3 zzzz-zzzz-zzzz-zzzz bbbb-bbbb-bbbb-bbbb Enabled + + This command gets all subscriptions in all tenants that are authorized for the current account. + + + + + + ---- Example 2: Get all subscriptions for a specific tenant ---- + Get-AzSubscription -TenantId "aaaa-aaaa-aaaa-aaaa" + +Name Id TenantId State +---- -- -------- ----- +Subscription1 yyyy-yyyy-yyyy-yyyy aaaa-aaaa-aaaa-aaaa Enabled +Subscription2 xxxx-xxxx-xxxx-xxxx aaaa-aaaa-aaaa-aaaa Enabled + + List all subscriptions in the given tenant that are authorized for the current account. + + + + + + ---- Example 3: Get all subscriptions in the current tenant ---- + Get-AzSubscription -TenantId (Get-AzContext).Tenant + +Name Id TenantId State +---- -- -------- ----- +Subscription1 yyyy-yyyy-yyyy-yyyy aaaa-aaaa-aaaa-aaaa Enabled +Subscription2 xxxx-xxxx-xxxx-xxxx aaaa-aaaa-aaaa-aaaa Enabled + + This command gets all subscriptions in the current tenant that are authorized for the current user. + + + + + + Example 4: Change the current context to use a specific subscription + Get-AzSubscription -SubscriptionId "xxxx-xxxx-xxxx-xxxx" -TenantId "yyyy-yyyy-yyyy-yyyy" | Set-AzContext + +Name Account SubscriptionName Environment TenantId +---- ------- ---------------- ----------- -------- +Subscription1 (xxxx-xxxx-xxxx-xxxx) azureuser@micros... Subscription1 AzureCloud yyyy-yyyy-yyyy-yyyy + + This command gets the specified subscription, and then sets the current context to use it. All subsequent cmdlets in this session use the new subscription (Contoso Subscription 1) by default. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-azsubscription + + + + + + Get-AzTenant + Get + AzTenant + + Gets tenants that are authorized for the current user. + + + + The Get-AzTenant cmdlet gets tenants authorized for the current user. + + + + Get-AzTenant + + TenantId + + Specifies the ID of the tenant that this cmdlet gets. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + TenantId + + Specifies the ID of the tenant that this cmdlet gets. + + System.String + + System.String + + + None + + + + + + System.String + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + + + + + + + + + + + + + ---------------- Example 1: Getting all tenants ---------------- + Connect-AzAccount +Get-AzTenant + +Id Name Category Domains +-- ----------- -------- ------- +xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Microsoft Home {test0.com, test1.com, test2.microsoft.com, test3.microsoft.com...} +yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy Testhost Home testhost.onmicrosoft.com + + This example shows how to get all of the authorized tenants of an Azure account. + + + + + + ------------- Example 2: Getting a specific tenant ------------- + Connect-AzAccount +Get-AzTenant -TenantId xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + +Id Name Category Domains +-- ----------- -------- ------- +xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx Microsoft Home {test0.com, test1.com, test2.microsoft.com, test3.microsoft.com...} + + This example shows how to get a specific authorized tenant of an Azure account. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/get-aztenant + + + + + + Import-AzConfig + Import + AzConfig + + Imports configs from a file that was previously exported by `Export-AzConfig`. + + + + The `Import-AzConfig` cmdlet imports all the configs from a file that was previously exported by `Export-AzConfig`. The imported configs will be set at the "CurrentUser" scope, so they are consistent across PowerShell sessions. + During importing, if a config that is to be imported has already been set, its value will be overwritten. + + + + Import-AzConfig + + Path + + Specifies the path to configuration saved by using Export-AzConfig. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + PassThru + + Returns a boolean value indicating success or failure. + + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + PassThru + + Returns a boolean value indicating success or failure. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Path + + Specifies the path to configuration saved by using Export-AzConfig. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Boolean + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Import-AzConfig -Path ./config.json + + This example imports configs from file `./config.json`. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/import-azconfig + + + Export-AzConfig + + + + + + + Import-AzContext + Import + AzContext + + Loads Azure authentication information from a file. + + + + The Import-AzContext cmdlet loads authentication information from a file to set the Azure environment and context. Cmdlets that you run in the current session use this information to authenticate requests to Azure Resource Manager. + + + + Import-AzContext + + AzureContext + + {{Fill AzureContext Description}} + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Import-AzContext + + Path + + Specifies the path to context information saved by using Save-AzContext. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + AzureContext + + {{Fill AzureContext Description}} + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Path + + Specifies the path to context information saved by using Save-AzContext. + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + + + + + + + System.String + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile + + + + + + + + + + + + + + ----- Example 1: Importing a context from a AzureRmProfile ----- + Import-AzContext -AzContext (Connect-AzAccount) + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + This example imports a context from a PSAzureProfile that is passed through to the cmdlet. + + + + + + ------- Example 2: Importing a context from a JSON file ------- + Import-AzContext -Path C:\test.json + +Account SubscriptionName TenantId Environment +------- ---------------- -------- ----------- +azureuser@contoso.com Subscription1 xxxx-xxxx-xxxx-xxxx AzureCloud + + This example selects a context from a JSON file that is passed through to the cmdlet. This JSON file can be created from Save-AzContext. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/import-azcontext + + + + + + Invoke-AzRestMethod + Invoke + AzRestMethod + + Construct and perform HTTP request to Azure resource management endpoint only + + + + Construct and perform HTTP request to Azure resource management endpoint only + + + + Invoke-AzRestMethod + + ApiVersion + + Api Version + + System.String + + System.String + + + None + + + AsJob + + Run cmdlet in the background + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Method + + Http Method + + + GET + POST + PUT + PATCH + DELETE + + System.String + + System.String + + + None + + + Name + + list of Target Resource Name + + System.String[] + + System.String[] + + + None + + + Payload + + JSON format payload + + System.String + + System.String + + + None + + + ResourceGroupName + + Target Resource Group Name + + System.String + + System.String + + + None + + + ResourceProviderName + + Target Resource Provider Name + + System.String + + System.String + + + None + + + ResourceType + + List of Target Resource Type + + System.String[] + + System.String[] + + + None + + + SubscriptionId + + Target Subscription Id + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Invoke-AzRestMethod + + AsJob + + Run cmdlet in the background + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Method + + Http Method + + + GET + POST + PUT + PATCH + DELETE + + System.String + + System.String + + + None + + + Path + + Path of target resource URL. Hostname of Resource Manager should not be added. + + System.String + + System.String + + + None + + + Payload + + JSON format payload + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Invoke-AzRestMethod + + Uri + + Uniform Resource Identifier of the Azure resources. The target resource needs to support Azure AD authentication and the access token is derived according to resource id. If resource id is not set, its value is derived according to built-in service suffixes in current Azure Environment. + + System.Uri + + System.Uri + + + None + + + AsJob + + Run cmdlet in the background + + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Method + + Http Method + + + GET + POST + PUT + PATCH + DELETE + + System.String + + System.String + + + None + + + Payload + + JSON format payload + + System.String + + System.String + + + None + + + ResourceId + + Identifier URI specified by the REST API you are calling. It shouldn't be the resource id of Azure Resource Manager. + + System.Uri + + System.Uri + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + ApiVersion + + Api Version + + System.String + + System.String + + + None + + + AsJob + + Run cmdlet in the background + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Method + + Http Method + + System.String + + System.String + + + None + + + Name + + list of Target Resource Name + + System.String[] + + System.String[] + + + None + + + Path + + Path of target resource URL. Hostname of Resource Manager should not be added. + + System.String + + System.String + + + None + + + Payload + + JSON format payload + + System.String + + System.String + + + None + + + ResourceGroupName + + Target Resource Group Name + + System.String + + System.String + + + None + + + ResourceId + + Identifier URI specified by the REST API you are calling. It shouldn't be the resource id of Azure Resource Manager. + + System.Uri + + System.Uri + + + None + + + ResourceProviderName + + Target Resource Provider Name + + System.String + + System.String + + + None + + + ResourceType + + List of Target Resource Type + + System.String[] + + System.String[] + + + None + + + SubscriptionId + + Target Subscription Id + + System.String + + System.String + + + None + + + Uri + + Uniform Resource Identifier of the Azure resources. The target resource needs to support Azure AD authentication and the access token is derived according to resource id. If resource id is not set, its value is derived according to built-in service suffixes in current Azure Environment. + + System.Uri + + System.Uri + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.string + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSHttpResponse + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Invoke-AzRestMethod -Path "/subscriptions/{subscription}/resourcegroups/{resourcegroup}/providers/microsoft.operationalinsights/workspaces/{workspace}?api-version={API}" -Method GET + +Headers : {[Cache-Control, System.String[]], [Pragma, System.String[]], [x-ms-request-id, System.String[]], [Strict-Transport-Security, System.String[]]…} +Version : 1.1 +StatusCode : 200 +Method : GET +Content : { + "properties": { + "source": "Azure", + "customerId": "{customerId}", + "provisioningState": "Succeeded", + "sku": { + "name": "pergb2018", + "maxCapacityReservationLevel": 3000, + "lastSkuUpdate": "Mon, 25 May 2020 11:10:01 GMT" + }, + "retentionInDays": 30, + "features": { + "legacy": 0, + "searchVersion": 1, + "enableLogAccessUsingOnlyResourcePermissions": true + }, + "workspaceCapping": { + "dailyQuotaGb": -1.0, + "quotaNextResetTime": "Thu, 18 Jun 2020 05:00:00 GMT", + "dataIngestionStatus": "RespectQuota" + }, + "enableFailover": false, + "publicNetworkAccessForIngestion": "Enabled", + "publicNetworkAccessForQuery": "Enabled", + "createdDate": "Mon, 25 May 2020 11:10:01 GMT", + "modifiedDate": "Mon, 25 May 2020 11:10:02 GMT" + }, + "id": "/subscriptions/{subscription}/resourcegroups/{resourcegroup}/providers/microsoft.operationalinsights/workspaces/{workspace}", + "name": "{workspace}", + "type": "Microsoft.OperationalInsights/workspaces", + "location": "eastasia", + "tags": {} + } + + Get log analytics workspace by path. It only supports management plane API and Hostname of Azure Resource Manager is added according to Azure environment setting. + + + + + + + -------------------------- Example 2 -------------------------- + Invoke-AzRestMethod https://graph.microsoft.com/v1.0/me + +Headers : {[Date, System.String[]], [Cache-Control, System.String[]], [Transfer-Encoding, System.String[]], [Strict-Transport-Security, System.String[]]…} +Version : 1.1 +StatusCode : 200 +Method : GET +Content : {"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users/$entity","businessPhones":["......} + + Get current signed in user via MicrosoftGraph API. This example is equivalent to `Get-AzADUser -SignedIn`. + + + + + + -------------------------- Example 3 -------------------------- + $subscriptionId = (Get-AzContext).Subscription.ID +Invoke-AzRestMethod -SubscriptionId $subscriptionId -ResourceGroupName "test-group" -ResourceProviderName Microsoft.AppPlatform -ResourceType Spring,apps -Name "test-spring-service" -ApiVersion 2020-07-01 -Method GET + +Headers : {[Cache-Control, System.String[]], [Pragma, System.String[]], [Vary, System.String[]], [x-ms-request-id, + System.String[]]…} +Version : 1.1 +StatusCode : 200 +Method : GET +Content : {"value":[{"properties":{"public":true,"url":"https://test-spring-service-demo.azuremicroservices.io","provisioni + ngState":"Succeeded","activeDeploymentName":"default","fqdn":"test-spring-service.azuremicroservices.io","httpsOn + ly":false,"createdTime":"2022-06-22T02:57:13.272Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"pers + istentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity + ":null,"location":"eastus","id":"/subscriptions/$subscriptionId/resourceGroups/test-group/providers/Microsoft.AppPlatform/Spring/test-spring-service/apps/demo","name":"demo"},{"properties":{"publ + ic":false,"provisioningState":"Succeeded","activeDeploymentName":"deploy01","fqdn":"test-spring-service.azuremicr + oservices.io","httpsOnly":false,"createdTime":"2022-06-22T07:46:54.9Z","temporaryDisk":{"sizeInGB":5,"moun + tPath":"/tmp"},"persistentDisk":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Sp + ring/apps","identity":null,"location":"eastus","id":"/subscriptions/$subscriptionId/r + esourceGroups/test-group/providers/Microsoft.AppPlatform/Spring/test-spring-service/apps/pwsh01","name":"pwsh0 + 1"}]} + + List apps under spring service "test-spring-service" + + + + + + -------------------------- Example 4 -------------------------- + $subscriptionId = (Get-AzContext).Subscription.ID +Invoke-AzRestMethod -SubscriptionId $subscriptionId -ResourceGroupName "test-group" -ResourceProviderName Microsoft.AppPlatform -ResourceType Spring -Name "test-spring-service","demo" -ApiVersion 2020-07-01 -Method GET + +Headers : {[Cache-Control, System.String[]], [Pragma, System.String[]], [Vary, System.String[]], [x-ms-request-id, + System.String[]]…} +Version : 1.1 +StatusCode : 200 +Method : GET +Content : {"properties":{"public":true,"url":"https://test-spring-service-demo.azuremicroservices.io","provisioningState":" + Succeeded","activeDeploymentName":"default","fqdn":"test-spring-service.azuremicroservices.io","httpsOnly":false, + "createdTime":"2022-06-22T02:57:13.272Z","temporaryDisk":{"sizeInGB":5,"mountPath":"/tmp"},"persistentDisk + ":{"sizeInGB":0,"mountPath":"/persistent"}},"type":"Microsoft.AppPlatform/Spring/apps","identity":null,"lo + cation":"eastus","id":"/subscriptions/$subscriptionId/resourceGroups/test-group/pr + oviders/Microsoft.AppPlatform/Spring/test-spring-service/apps/demo","name":"demo"} + + Get app "demo" under Spring cloud service "test-spring-service" + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/invoke-azrestmethod + + + + + + Open-AzSurveyLink + Open + AzSurveyLink + + Open survey link in default browser. + + + + Open survey link in default browser. + + + + Open-AzSurveyLink + + + + + + + None + + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Open-AzSurveyLink + +Opening the default browser to https://aka.ms/azpssurvey?Q_CHL=INTERCEPT + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/open-azsurveylink + + + + + + Register-AzModule + Register + AzModule + + FOR INTERNAL USE ONLY - Provide Runtime Support for AutoRest Generated cmdlets + + + + FOR INTERNAL USE ONLY - Provide Runtime Support for AutoRest Generated cmdlets + + + + Register-AzModule + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Register-AzModule + + Used Internally by AutoRest-generated cmdlets + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/register-azmodule + + + + + + Remove-AzContext + Remove + AzContext + + Remove a context from the set of available contexts + + + + Remove an azure context from the set of contexts + + + + Remove-AzContext + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Remove context even if it is the default + + + System.Management.Automation.SwitchParameter + + + False + + + InputObject + + A context object, normally passed through the pipeline. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + PassThru + + Return the removed context + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Remove-AzContext + + Name + + The name of the context + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Remove context even if it is the default + + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Return the removed context + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Remove context even if it is the default + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + InputObject + + A context object, normally passed through the pipeline. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + Name + + The name of the context + + System.String + + System.String + + + None + + + PassThru + + Return the removed context + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Remove-AzContext -Name Default + + Remove the context named default + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/remove-azcontext + + + + + + Remove-AzEnvironment + Remove + AzEnvironment + + Removes endpoints and metadata for connecting to a given Azure instance. + + + + The Remove-AzEnvironment cmdlet removes endpoints and metadata information for connecting to a given Azure instance. + + + + Remove-AzEnvironment + + Name + + Specifies the name of the environment to remove. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Name + + Specifies the name of the environment to remove. + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.String + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment + + + + + + + + + + + + + + ----- Example 1: Creating and removing a test environment ----- + Add-AzEnvironment -Name TestEnvironment ` + -ActiveDirectoryEndpoint TestADEndpoint ` + -ActiveDirectoryServiceEndpointResourceId TestADApplicationId ` + -ResourceManagerEndpoint TestRMEndpoint ` + -GalleryEndpoint TestGalleryEndpoint ` + -GraphEndpoint TestGraphEndpoint + +Name Resource Manager Url ActiveDirectory Authority +---- -------------------- ------------------------- +TestEnvironment TestRMEndpoint TestADEndpoint/ + +Remove-AzEnvironment -Name TestEnvironment + +Name Resource Manager Url ActiveDirectory Authority +---- -------------------- ------------------------- +TestEnvironment TestRMEndpoint TestADEndpoint/ + + This example shows how to create an environment using Add-AzEnvironment, and then how to delete the environment using Remove-AzEnvironment. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/remove-azenvironment + + + Add-AzEnvironment + + + + Get-AzEnvironment + + + + Set-AzEnvironment + + + + + + + Rename-AzContext + Rename + AzContext + + Rename an Azure context. By default contexts are named by user account and subscription. + + + + Rename an Azure context. By default contexts are named by user account and subscription. + + + + Rename-AzContext + + TargetName + + The new name of the context + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Rename the context even if the target context already exists + + + System.Management.Automation.SwitchParameter + + + False + + + InputObject + + A context object, normally passed through the pipeline. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + PassThru + + Return the renamed context. + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Rename-AzContext + + SourceName + + The name of the context + + System.String + + System.String + + + None + + + TargetName + + The new name of the context + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Rename the context even if the target context already exists + + + System.Management.Automation.SwitchParameter + + + False + + + PassThru + + Return the renamed context. + + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Rename the context even if the target context already exists + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + InputObject + + A context object, normally passed through the pipeline. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + PassThru + + Return the renamed context. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + SourceName + + The name of the context + + System.String + + System.String + + + None + + + TargetName + + The new name of the context + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + + + + + ------ Example 1: Rename a context using named parameters ------ + Rename-AzContext -SourceName "[user1@contoso.org; 12345-6789-2345-3567890]" -TargetName "Work" + + Rename the context for 'user1@contoso.org' with subscription '12345-6789-2345-3567890' to 'Work'. After this command, you will be able to target the context using 'Select-AzContext Work'. Note that you can tab through the values for 'SourceName' using tab completion. + + + + + + --- Example 2: Rename a context using positional parameters --- + Rename-AzContext "My context" "Work" + + Rename the context named "My context" to "Work". After this command, you will be able to target the context using Select-AzContext Work + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/rename-azcontext + + + + + + Resolve-AzError + Resolve + AzError + + Display detailed information about PowerShell errors, with extended details for Azure PowerShell errors. + + + + Resolves and displays detailed information about errors in the current PowerShell session, including where the error occurred in script, stack trace, and all inner and aggregate exceptions. For Azure PowerShell errors provides additional detail in debugging service issues, including complete detail about the request and server response that caused the error. + + + + Resolve-AzError + + Error + + One or more error records to resolve. If no parameters are specified, all errors in the session are resolved. + + System.Management.Automation.ErrorRecord[] + + System.Management.Automation.ErrorRecord[] + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + + Resolve-AzError + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Last + + Resolve only the last error that occurred in the session. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Error + + One or more error records to resolve. If no parameters are specified, all errors in the session are resolved. + + System.Management.Automation.ErrorRecord[] + + System.Management.Automation.ErrorRecord[] + + + None + + + Last + + Resolve only the last error that occurred in the session. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.Management.Automation.ErrorRecord[] + + + + + + + + + + Microsoft.Azure.Commands.Profile.Errors.AzureErrorRecord + + + + + + + + Microsoft.Azure.Commands.Profile.Errors.AzureExceptionRecord + + + + + + + + Microsoft.Azure.Commands.Profile.Errors.AzureRestExceptionRecord + + + + + + + + + + + + + + -------------- Example 1: Resolve the Last Error -------------- + Resolve-AzError -Last + +HistoryId: 3 + + +Message : Run Connect-AzAccount to login. +StackTrace : at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.get_DefaultContext() in AzureRmCmdlet.cs:line 85 + at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.LogCmdletStartInvocationInfo() in AzureRmCmdlet.cs:line 269 + at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.BeginProcessing() inAzurePSCmdlet.cs:line 299 + at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.BeginProcessing() in AzureRmCmdlet.cs:line 320 + at Microsoft.Azure.Commands.Profile.GetAzureRMSubscriptionCommand.BeginProcessing() in GetAzureRMSubscription.cs:line 49 + at System.Management.Automation.Cmdlet.DoBeginProcessing() + at System.Management.Automation.CommandProcessorBase.DoBegin() +Exception : System.Management.Automation.PSInvalidOperationException +InvocationInfo : {Get-AzSubscription} +Line : Get-AzSubscription +Position : At line:1 char:1 + + Get-AzSubscription + + ~~~~~~~~~~~~~~~~~~~~~~~ +HistoryId : 3 + + Get details of the last error. + + + + + + --------- Example 2: Resolve all Errors in the Session --------- + Resolve-AzError + +HistoryId: 8 + + +RequestId : b61309e8-09c9-4f0d-ba56-08a6b28c731d +Message : Resource group 'contoso' could not be found. +ServerMessage : ResourceGroupNotFound: Resource group 'contoso' could not be found. + (System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError]) +ServerResponse : {NotFound} +RequestMessage : {GET https://management.azure.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/resourceGroups/co + ntoso/providers/Microsoft.Storage/storageAccounts/contoso?api-version=2016-12-01} +InvocationInfo : {Get-AzStorageAccount} +Line : Get-AzStorageAccount -ResourceGroupName contoso -Name contoso +Position : At line:1 char:1 + + Get-AzStorageAccount -ResourceGroupName contoso -Name contoso + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +StackTrace : at Microsoft.Azure.Management.Storage.StorageAccountsOperations.<GetPropertiesWithHttpMessagesAsync + >d__8.MoveNext() + --- End of stack trace from previous location where exception was thrown --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.<GetPropertiesAsync>d__7. + MoveNext() + --- End of stack trace from previous location where exception was thrown --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.GetProperties(IStorageAcc + ountsOperations operations, String resourceGroupName, String accountName) + at Microsoft.Azure.Commands.Management.Storage.GetAzureStorageAccountCommand.ExecuteCmdlet() in C:\ + zd\azure-powershell\src\ResourceManager\Storage\Commands.Management.Storage\StorageAccount\GetAzureSto + rageAccount.cs:line 70 + at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() in + C:\zd\azure-powershell\src\Common\Commands.Common\AzurePSCmdlet.cs:line 642 +HistoryId : 8 + + + HistoryId: 5 + + +Message : Run Connect-AzAccount to login. +StackTrace : at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.get_DefaultContext() in C:\zd\azur + e-powershell\src\ResourceManager\Common\Commands.ResourceManager.Common\AzureRmCmdlet.cs:line 85 + at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.LogCmdletStartInvocationInfo() in + C:\zd\azure-powershell\src\ResourceManager\Common\Commands.ResourceManager.Common\AzureRmCmdlet.cs:lin + e 269 + at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.BeginProcessing() in + C:\zd\azure-powershell\src\Common\Commands.Common\AzurePSCmdlet.cs:line 299 + at Microsoft.Azure.Commands.ResourceManager.Common.AzureRMCmdlet.BeginProcessing() in C:\zd\azure-p + owershell\src\ResourceManager\Common\Commands.ResourceManager.Common\AzureRmCmdlet.cs:line 320 + at Microsoft.Azure.Commands.Profile.GetAzureRMSubscriptionCommand.BeginProcessing() in C:\zd\azure- + powershell\src\ResourceManager\Profile\Commands.Profile\Subscription\GetAzureRMSubscription.cs:line 49 + at System.Management.Automation.Cmdlet.DoBeginProcessing() + at System.Management.Automation.CommandProcessorBase.DoBegin() +Exception : System.Management.Automation.PSInvalidOperationException +InvocationInfo : {Get-AzSubscription} +Line : Get-AzSubscription +Position : At line:1 char:1 + + Get-AzSubscription + + ~~~~~~~~~~~~~~~~~~~~~~~ +HistoryId : 5 + + Get details of all errors that have occurred in the current session. + + + + + + ------------- Example 3: Resolve a Specific Error ------------- + Resolve-AzError $Error[0] + +HistoryId: 8 + + +RequestId : b61309e8-09c9-4f0d-ba56-08a6b28c731d +Message : Resource group 'contoso' could not be found. +ServerMessage : ResourceGroupNotFound: Resource group 'contoso' could not be found. + (System.Collections.Generic.List`1[Microsoft.Rest.Azure.CloudError]) +ServerResponse : {NotFound} +RequestMessage : {GET https://management.azure.com/subscriptions/00977cdb-163f-435f-9c32-39ec8ae61f4d/resourceGroups/co + ntoso/providers/Microsoft.Storage/storageAccounts/contoso?api-version=2016-12-01} +InvocationInfo : {Get-AzStorageAccount} +Line : Get-AzStorageAccount -ResourceGroupName contoso -Name contoso +Position : At line:1 char:1 + + Get-AzStorageAccount -ResourceGroupName contoso -Name contoso + + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +StackTrace : at Microsoft.Azure.Management.Storage.StorageAccountsOperations.<GetPropertiesWithHttpMessagesAsync + >d__8.MoveNext() + --- End of stack trace from previous location where exception was thrown --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.<GetPropertiesAsync>d__7. + MoveNext() + --- End of stack trace from previous location where exception was thrown --- + at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) + at Microsoft.Azure.Management.Storage.StorageAccountsOperationsExtensions.GetProperties(IStorageAcc + ountsOperations operations, String resourceGroupName, String accountName) + at Microsoft.Azure.Commands.Management.Storage.GetAzureStorageAccountCommand.ExecuteCmdlet() in C:\ + zd\azure-powershell\src\ResourceManager\Storage\Commands.Management.Storage\StorageAccount\GetAzureSto + rageAccount.cs:line 70 + at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord() in + C:\zd\azure-powershell\src\Common\Commands.Common\AzurePSCmdlet.cs:line 642 +HistoryId : 8 + + Get details of the specified error. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/resolve-azerror + + + + + + Save-AzContext + Save + AzContext + + Saves the current authentication information for use in other PowerShell sessions. + + + + The Save-AzContext cmdlet saves the current authentication information for use in other PowerShell sessions. + + + + Save-AzContext + + Profile + + Specifies the Azure context from which this cmdlet reads. If you do not specify a context, this cmdlet reads from the local default context. + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + + None + + + Path + + Specifies the path of the file to which to save authentication information. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Overwrite the given file if it exists + + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Overwrite the given file if it exists + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Path + + Specifies the path of the file to which to save authentication information. + + System.String + + System.String + + + None + + + Profile + + Specifies the Azure context from which this cmdlet reads. If you do not specify a context, this cmdlet reads from the local default context. + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + Microsoft.Azure.Commands.Common.Authentication.Models.AzureRmProfile + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureProfile + + + + + + + + + + + + + + ------- Example 1: Saving the current session's context ------- + Connect-AzAccount +Save-AzContext -Path C:\test.json + + This example saves the current session's Azure context to the JSON file provided. + + + + + + -------------- Example 2: Saving a given context -------------- + Save-AzContext -Profile (Connect-AzAccount) -Path C:\test.json + + This example saves the Azure context that is passed through to the cmdlet to the JSON file provided. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/save-azcontext + + + + + + Select-AzContext + Select + AzContext + + Select a subscription and account to target in Azure PowerShell cmdlets + + + + Select a subscription to target (or account or tenant) in Azure PowerShell cmdlets. After this cmdlet, future cmdlets will target the selected context. + + + + Select-AzContext + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + InputObject + + A context object, normally passed through the pipeline. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Select-AzContext + + Name + + The name of the context + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, tenant and subscription used for communication with azure + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + InputObject + + A context object, normally passed through the pipeline. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + Name + + The name of the context + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + + + + + -------------- Example 1: Target a named context -------------- + Select-AzContext "Work" + +Name Account SubscriptionName Environment TenantId +---- ------- ---------------- ----------- -------- +Work test@outlook.com Subscription1 AzureCloud xxxxxxxx-x... + + Target future Azure PowerShell cmdlets at the account, tenant, and subscription in the 'Work' context. + + + + + + -------------------------- Example 2 -------------------------- + Select-AzContext -Name TestEnvironment -Scope Process + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/select-azcontext + + + + + + Send-Feedback + Send + Feedback + + Sends feedback to the Azure PowerShell team via a set of guided prompts. + + + + The Send-Feedback cmdlet sends feedback to the Azure PowerShell team. + + + + Send-Feedback + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + + + + None + + + + + + + + + + System.Void + + + + + + + + + + + + + + -------------------------- Example 1: -------------------------- + Send-Feedback + +With zero (0) being the least and ten (10) being the most, how likely are you to recommend Azure PowerShell to a friend or colleague? + +10 + +What does Azure PowerShell do well? + +Response. + +Upon what could Azure PowerShell improve? + +Response. + +Please enter your email if you are interested in providing follow up information: + +your@email.com + + + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/send-feedback + + + + + + Set-AzContext + Set + AzContext + + Sets the tenant, subscription, and environment for cmdlets to use in the current session. + + + + The Set-AzContext cmdlet sets authentication information for cmdlets that you run in the current session. The context includes tenant, subscription, and environment information. + + + + Set-AzContext + + Context + + Specifies the context for the current session. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ExtendedProperty + + Additional context properties + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + + None + + + Force + + Overwrite the existing context with the same name, if any. + + + System.Management.Automation.SwitchParameter + + + False + + + Name + + Name of the context + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Set-AzContext + + Subscription + + The name or id of the subscription that the context should be set to. This parameter has aliases to -SubscriptionName and -SubscriptionId, so, for clarity, either of these can be used instead of -Subscription when specifying name and id, respectively. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ExtendedProperty + + Additional context properties + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + + None + + + Force + + Overwrite the existing context with the same name, if any. + + + System.Management.Automation.SwitchParameter + + + False + + + Name + + Name of the context + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Tenant + + Tenant domain name or ID + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Set-AzContext + + SubscriptionObject + + A subscription object + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ExtendedProperty + + Additional context properties + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + + None + + + Force + + Overwrite the existing context with the same name, if any. + + + System.Management.Automation.SwitchParameter + + + False + + + Name + + Name of the context + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Set-AzContext + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ExtendedProperty + + Additional context properties + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + + None + + + Force + + Overwrite the existing context with the same name, if any. + + + System.Management.Automation.SwitchParameter + + + False + + + Name + + Name of the context + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Tenant + + Tenant domain name or ID + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Set-AzContext + + TenantObject + + A Tenant Object + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ExtendedProperty + + Additional context properties + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + + None + + + Force + + Overwrite the existing context with the same name, if any. + + + System.Management.Automation.SwitchParameter + + + False + + + Name + + Name of the context + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + Context + + Specifies the context for the current session. + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + None + + + DefaultProfile + + The credentials, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + ExtendedProperty + + Additional context properties + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + System.Collections.Generic.IDictionary`2[System.String,System.String] + + + None + + + Force + + Overwrite the existing context with the same name, if any. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Name + + Name of the context + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Subscription + + The name or id of the subscription that the context should be set to. This parameter has aliases to -SubscriptionName and -SubscriptionId, so, for clarity, either of these can be used instead of -Subscription when specifying name and id, respectively. + + System.String + + System.String + + + None + + + SubscriptionObject + + A subscription object + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + + None + + + Tenant + + Tenant domain name or ID + + System.String + + System.String + + + None + + + TenantObject + + A Tenant Object + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureTenant + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureSubscription + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.Core.PSAzureContext + + + + + + + + + + + + + + ----------- Example 1: Set the subscription context ----------- + Set-AzContext -Subscription "xxxx-xxxx-xxxx-xxxx" + +Name Account SubscriptionName Environment TenantId +---- ------- ---------------- ----------- -------- +Work test@outlook.com Subscription1 AzureCloud xxxxxxxx-x... + + This command sets the context to use the specified subscription. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/set-azcontext + + + Get-AzContext + + + + + + + Set-AzDefault + Set + AzDefault + + Sets a default in the current context + + + + The Set-AzDefault cmdlet adds or changes the defaults in the current context. + + + + Set-AzDefault + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Create a new resource group if specified default does not exist + + + System.Management.Automation.SwitchParameter + + + False + + + ResourceGroupName + + Name of the resource group being set as default + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Force + + Create a new resource group if specified default does not exist + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + ResourceGroupName + + Name of the resource group being set as default + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.String + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSResourceGroup + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Set-AzDefault -ResourceGroupName myResourceGroup + +Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup +Name : myResourceGroup +Properties : Microsoft.Azure.Management.Internal.Resources.Models.ResourceGroupProperties +Location : eastus +ManagedBy : +Tags : + + This command sets the default resource group to the resource group specified by the user. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/set-azdefault + + + + + + Set-AzEnvironment + Set + AzEnvironment + + Sets properties for an Azure environment. + + + + The Set-AzEnvironment cmdlet sets endpoints and metadata for connecting to an instance of Azure. + + + + Set-AzEnvironment + + Name + + Specifies the name of the environment to modify. + + System.String + + System.String + + + None + + + PublishSettingsFileUrl + + Specifies the URL from which .publishsettings files can be downloaded. + + System.String + + System.String + + + None + + + AzureKeyVaultDnsSuffix + + Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net + + System.String + + System.String + + + None + + + AzureKeyVaultServiceEndpointResourceId + + Resource identifier of Azure Key Vault data service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + TrafficManagerDnsSuffix + + Specifies the domain-name suffix for Azure Traffic Manager services. + + System.String + + System.String + + + None + + + SqlDatabaseDnsSuffix + + Specifies the domain-name suffix for Azure SQL Database servers. + + System.String + + System.String + + + None + + + AzureDataLakeStoreFileSystemEndpointSuffix + + Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net + + System.String + + System.String + + + None + + + AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix + + Dns Suffix of Azure Data Lake Analytics job and catalog services + + System.String + + System.String + + + None + + + EnableAdfsAuthentication + + Indicates that Active Directory Federation Services (ADFS) on-premise authentication is allowed. + + + System.Management.Automation.SwitchParameter + + + False + + + AdTenant + + Specifies the default Active Directory tenant. + + System.String + + System.String + + + None + + + GraphAudience + + The audience for tokens authenticating with the AD Graph Endpoint. + + System.String + + System.String + + + None + + + DataLakeAudience + + The audience for tokens authenticating with the AD Data Lake services Endpoint. + + System.String + + System.String + + + None + + + ServiceEndpoint + + Specifies the endpoint for Service Management (RDFE) requests. + + System.String + + System.String + + + None + + + BatchEndpointResourceId + + The resource identifier of the Azure Batch service that is the recipient of the requested token + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpointResourceId + + The audience for tokens authenticating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpoint + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + ManagementPortalUrl + + Specifies the URL for the Management Portal. + + System.String + + System.String + + + None + + + StorageEndpoint + + Specifies the endpoint for storage (blob, table, queue, and file) access. + + System.String + + System.String + + + None + + + ActiveDirectoryEndpoint + + Specifies the base authority for Azure Active Directory authentication. + + System.String + + System.String + + + None + + + ResourceManagerEndpoint + + Specifies the URL for Azure Resource Manager requests. + + System.String + + System.String + + + None + + + GalleryEndpoint + + Specifies the endpoint for the Azure Resource Manager gallery of deployment templates. The parameter is to set the value to `GalleryUrl` of `PSAzureEnvironment`. As `GalleryUrl` is removed from ArmMetadata, Azure PowerShell will no longer provide for the value and so it is not recommended to set `GalleryEndpoint` anymore. + + System.String + + System.String + + + None + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management (RDFE) endpoints. + + System.String + + System.String + + + None + + + GraphEndpoint + + Specifies the URL for Graph (Active Directory metadata) requests. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointResourceId + + The resource identifier of the Azure Analysis Services resource. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointSuffix + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointResourceId + + The The resource identifier of the Azure Attestation service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointSuffix + + Dns suffix of Azure Attestation service. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointResourceId + + The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointSuffix + + Dns suffix of Azure Synapse Analytics. + + System.String + + System.String + + + None + + + ContainerRegistryEndpointSuffix + + Suffix of Azure Container Registry. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + MicrosoftGraphEndpointResourceId + + The resource identifier of Microsoft Graph + + System.String + + System.String + + + None + + + MicrosoftGraphUrl + + Microsoft Graph Url + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + Set-AzEnvironment + + Name + + Specifies the name of the environment to modify. + + System.String + + System.String + + + None + + + ARMEndpoint + + The Azure Resource Manager endpoint. + + System.String + + System.String + + + None + + + AzureKeyVaultDnsSuffix + + Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net + + System.String + + System.String + + + None + + + AzureKeyVaultServiceEndpointResourceId + + Resource identifier of Azure Key Vault data service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + DataLakeAudience + + The audience for tokens authenticating with the AD Data Lake services Endpoint. + + System.String + + System.String + + + None + + + BatchEndpointResourceId + + The resource identifier of the Azure Batch service that is the recipient of the requested token + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpointResourceId + + The audience for tokens authenticating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpoint + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + StorageEndpoint + + Specifies the endpoint for storage (blob, table, queue, and file) access. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointResourceId + + The resource identifier of the Azure Analysis Services resource. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointSuffix + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointResourceId + + The The resource identifier of the Azure Attestation service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointSuffix + + Dns suffix of Azure Attestation service. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointResourceId + + The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointSuffix + + Dns suffix of Azure Synapse Analytics. + + System.String + + System.String + + + None + + + ContainerRegistryEndpointSuffix + + Suffix of Azure Container Registry. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + + Process + CurrentUser + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + ActiveDirectoryEndpoint + + Specifies the base authority for Azure Active Directory authentication. + + System.String + + System.String + + + None + + + ActiveDirectoryServiceEndpointResourceId + + Specifies the audience for tokens that authenticate requests to Azure Resource Manager or Service Management (RDFE) endpoints. + + System.String + + System.String + + + None + + + AdTenant + + Specifies the default Active Directory tenant. + + System.String + + System.String + + + None + + + ARMEndpoint + + The Azure Resource Manager endpoint. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointResourceId + + The resource identifier of the Azure Analysis Services resource. + + System.String + + System.String + + + None + + + AzureAnalysisServicesEndpointSuffix + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointResourceId + + The The resource identifier of the Azure Attestation service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureAttestationServiceEndpointSuffix + + Dns suffix of Azure Attestation service. + + System.String + + System.String + + + None + + + AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix + + Dns Suffix of Azure Data Lake Analytics job and catalog services + + System.String + + System.String + + + None + + + AzureDataLakeStoreFileSystemEndpointSuffix + + Dns Suffix of Azure Data Lake Store FileSystem. Example: azuredatalake.net + + System.String + + System.String + + + None + + + AzureKeyVaultDnsSuffix + + Dns suffix of Azure Key Vault service. Example is vault-int.azure-int.net + + System.String + + System.String + + + None + + + AzureKeyVaultServiceEndpointResourceId + + Resource identifier of Azure Key Vault data service that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpoint + + The endpoint to use when communicating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureOperationalInsightsEndpointResourceId + + The audience for tokens authenticating with the Azure Log Analytics API. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointResourceId + + The The resource identifier of the Azure Synapse Analytics that is the recipient of the requested token. + + System.String + + System.String + + + None + + + AzureSynapseAnalyticsEndpointSuffix + + Dns suffix of Azure Synapse Analytics. + + System.String + + System.String + + + None + + + BatchEndpointResourceId + + The resource identifier of the Azure Batch service that is the recipient of the requested token + + System.String + + System.String + + + None + + + ContainerRegistryEndpointSuffix + + Suffix of Azure Container Registry. + + System.String + + System.String + + + None + + + DataLakeAudience + + The audience for tokens authenticating with the AD Data Lake services Endpoint. + + System.String + + System.String + + + None + + + DefaultProfile + + The credentials, account, tenant and subscription used for communication with azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + EnableAdfsAuthentication + + Indicates that Active Directory Federation Services (ADFS) on-premise authentication is allowed. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + GalleryEndpoint + + Specifies the endpoint for the Azure Resource Manager gallery of deployment templates. The parameter is to set the value to `GalleryUrl` of `PSAzureEnvironment`. As `GalleryUrl` is removed from ArmMetadata, Azure PowerShell will no longer provide for the value and so it is not recommended to set `GalleryEndpoint` anymore. + + System.String + + System.String + + + None + + + GraphAudience + + The audience for tokens authenticating with the AD Graph Endpoint. + + System.String + + System.String + + + None + + + GraphEndpoint + + Specifies the URL for Graph (Active Directory metadata) requests. + + System.String + + System.String + + + None + + + ManagementPortalUrl + + Specifies the URL for the Management Portal. + + System.String + + System.String + + + None + + + MicrosoftGraphEndpointResourceId + + The resource identifier of Microsoft Graph + + System.String + + System.String + + + None + + + MicrosoftGraphUrl + + Microsoft Graph Url + + System.String + + System.String + + + None + + + Name + + Specifies the name of the environment to modify. + + System.String + + System.String + + + None + + + PublishSettingsFileUrl + + Specifies the URL from which .publishsettings files can be downloaded. + + System.String + + System.String + + + None + + + ResourceManagerEndpoint + + Specifies the URL for Azure Resource Manager requests. + + System.String + + System.String + + + None + + + Scope + + Determines the scope of context changes, for example, whether changes apply only to the current process, or to all sessions started by this user. + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + Microsoft.Azure.Commands.Profile.Common.ContextModificationScope + + + None + + + ServiceEndpoint + + Specifies the endpoint for Service Management (RDFE) requests. + + System.String + + System.String + + + None + + + SqlDatabaseDnsSuffix + + Specifies the domain-name suffix for Azure SQL Database servers. + + System.String + + System.String + + + None + + + StorageEndpoint + + Specifies the endpoint for storage (blob, table, queue, and file) access. + + System.String + + System.String + + + None + + + TrafficManagerDnsSuffix + + Specifies the domain-name suffix for Azure Traffic Manager services. + + System.String + + System.String + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.String + + + + + + + + System.Management.Automation.SwitchParameter + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSAzureEnvironment + + + + + + + + + + + + + + ----- Example 1: Creating and modifying a new environment ----- + Add-AzEnvironment -Name TestEnvironment ` + -ActiveDirectoryEndpoint TestADEndpoint ` + -ActiveDirectoryServiceEndpointResourceId TestADApplicationId ` + -ResourceManagerEndpoint TestRMEndpoint ` + -GalleryEndpoint TestGalleryEndpoint ` + -GraphEndpoint TestGraphEndpoint + +Name Resource Manager Url ActiveDirectory Authority +---- -------------------- ------------------------- +TestEnvironment TestRMEndpoint TestADEndpoint/ + +Set-AzEnvironment -Name TestEnvironment ` + -ActiveDirectoryEndpoint NewTestADEndpoint ` + -GraphEndpoint NewTestGraphEndpoint | Format-List + +Name : TestEnvironment +EnableAdfsAuthentication : False +ActiveDirectoryServiceEndpointResourceId : TestADApplicationId +AdTenant : +GalleryUrl : TestGalleryEndpoint +ManagementPortalUrl : +ServiceManagementUrl : +PublishSettingsFileUrl : +ResourceManagerUrl : TestRMEndpoint +SqlDatabaseDnsSuffix : +StorageEndpointSuffix : +ActiveDirectoryAuthority : NewTestADEndpoint +GraphUrl : NewTestGraphEndpoint +GraphEndpointResourceId : +TrafficManagerDnsSuffix : +AzureKeyVaultDnsSuffix : +AzureDataLakeStoreFileSystemEndpointSuffix : +AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix : +AzureKeyVaultServiceEndpointResourceId : +BatchEndpointResourceId : +AzureOperationalInsightsEndpoint : +AzureOperationalInsightsEndpointResourceId : +AzureAttestationServiceEndpointSuffix : +AzureAttestationServiceEndpointResourceId : +AzureSynapseAnalyticsEndpointSuffix : +AzureSynapseAnalyticsEndpointResourceId : + + In this example we are creating a new Azure environment with sample endpoints using Add-AzEnvironment, and then we are changing the value of the ActiveDirectoryEndpoint and GraphEndpoint attributes of the created environment using the cmdlet Set-AzEnvironment. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/set-azenvironment + + + Add-AzEnvironment + + + + Get-AzEnvironment + + + + Remove-AzEnvironment + + + + + + + Uninstall-AzureRm + Uninstall + AzureRm + + Removes all AzureRm modules from a machine. + + + + Removes all AzureRm modules from a machine. + + + + Uninstall-AzureRm + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + PassThru + + Return list of Modules removed if specified. + + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + PassThru + + Return list of Modules removed if specified. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + None + + + + + + + + + + System.String + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Uninstall-AzureRm + + Running this command will remove all AzureRm modules from the machine for the version of PowerShell in which the cmdlet is run. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/uninstall-azurerm + + + + + + Update-AzConfig + Update + AzConfig + + Updates the configs of Azure PowerShell. + + + + Updates the configs of Azure PowerShell. Depending on which config to update, you may specify the scope where the config is persisted and to which module or cmdlet it applies to. + > [!NOTE] > It is discouraged to update configs in multiple PowerShell processes. Either do it in one process, or make sure the updates are at Process scope (`-Scope Process`) to avoid unexpected side-effects. + + + + Update-AzConfig + + AppliesTo + + Specifies what part of Azure PowerShell the config applies to. Possible values are: - "Az": the config applies to all modules and cmdlets of Azure PowerShell. + - Module name: the config applies to a certain module of Azure PowerShell. + For example, "Az.Storage". - Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell. For example, "Get-AzKeyVault". If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az". + + System.String + + System.String + + + None + + + CheckForUpgrade + + When enabled, Azure PowerShell will check for updates automatically and display a hint message when an update is available. The default value will be changed from false to true in Az version 11.0.0. + + System.Boolean + + System.Boolean + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + DefaultSubscriptionForLogin + + Subscription name or GUID. Sets the default context for Azure PowerShell when logging in without specifying a subscription. + + System.String + + System.String + + + None + + + DisableErrorRecordsPersistence + + When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in in the next major release of Az around November 2023. + + System.Boolean + + System.Boolean + + + None + + + DisplayBreakingChangeWarning + + Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release. + + System.Boolean + + System.Boolean + + + None + + + DisplayRegionIdentified + + When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs. + + System.Boolean + + System.Boolean + + + None + + + DisplaySurveyMessage + + When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell. + + System.Boolean + + System.Boolean + + + None + + + EnableDataCollection + + When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experience. For more information, see our privacy statement: https://aka.ms/privacy + + System.Boolean + + System.Boolean + + + None + + + EnableLoginByWam + + [Preview] When enabled, Web Account Manager (WAM) will be the default interactive login experience. It will fall back to using the browser if the platform does not support WAM. Note that this feature is under preview. Microsoft Account (MSA) is currently not supported. Feel free to reach out to Azure PowerShell team if you have any feedbacks: https://aka.ms/azpsissue + + System.Boolean + + System.Boolean + + + None + + + Scope + + Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user. By default it is CurrentUser. + + + CurrentUser + Process + Default + Environment + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + System.Management.Automation.SwitchParameter + + + False + + + + + + AppliesTo + + Specifies what part of Azure PowerShell the config applies to. Possible values are: - "Az": the config applies to all modules and cmdlets of Azure PowerShell. + - Module name: the config applies to a certain module of Azure PowerShell. + For example, "Az.Storage". - Cmdlet name: the config applies to a certain cmdlet of Azure PowerShell. For example, "Get-AzKeyVault". If not specified, when getting or clearing configs, it defaults to all the above; when updating, it defaults to "Az". + + System.String + + System.String + + + None + + + CheckForUpgrade + + When enabled, Azure PowerShell will check for updates automatically and display a hint message when an update is available. The default value will be changed from false to true in Az version 11.0.0. + + System.Boolean + + System.Boolean + + + None + + + DefaultProfile + + The credentials, account, tenant, and subscription used for communication with Azure. + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer + + + None + + + DefaultSubscriptionForLogin + + Subscription name or GUID. Sets the default context for Azure PowerShell when logging in without specifying a subscription. + + System.String + + System.String + + + None + + + DisableErrorRecordsPersistence + + When disabled, error records will not be written to ~/.Azure/ErrorRecords. This config will be replaced by "EnableErrorRecordsPersistence" as opt-in in the next major release of Az around November 2023. + + System.Boolean + + System.Boolean + + + None + + + DisplayBreakingChangeWarning + + Controls if warning messages for breaking changes are displayed or suppressed. When enabled, a breaking change warning is displayed when executing cmdlets with breaking changes in a future release. + + System.Boolean + + System.Boolean + + + None + + + DisplayRegionIdentified + + When enabled, Azure PowerShell displays recommendations on regions which may reduce your costs. + + System.Boolean + + System.Boolean + + + None + + + DisplaySurveyMessage + + When enabled, you are prompted infrequently to participate in user experience surveys for Azure PowerShell. + + System.Boolean + + System.Boolean + + + None + + + EnableDataCollection + + When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experience. For more information, see our privacy statement: https://aka.ms/privacy + + System.Boolean + + System.Boolean + + + None + + + EnableLoginByWam + + [Preview] When enabled, Web Account Manager (WAM) will be the default interactive login experience. It will fall back to using the browser if the platform does not support WAM. Note that this feature is under preview. Microsoft Account (MSA) is currently not supported. Feel free to reach out to Azure PowerShell team if you have any feedbacks: https://aka.ms/azpsissue + + System.Boolean + + System.Boolean + + + None + + + Scope + + Determines the scope of config changes, for example, whether changes apply only to the current process, or to all sessions started by this user. By default it is CurrentUser. + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + Microsoft.Azure.PowerShell.Common.Config.ConfigScope + + + None + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + System.Management.Automation.SwitchParameter + + System.Management.Automation.SwitchParameter + + + False + + + + + + System.String + + + + + + + + System.Boolean + + + + + + + + + + Microsoft.Azure.Commands.Profile.Models.PSConfig + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + Update-AzConfig -DefaultSubscriptionForLogin "Name of subscription" + +Key Value Applies To Scope Help Message +--- ----- ---------- ----- ------------ +DefaultSubscriptionForLogin Name of subscription Az CurrentUser Subscription name or GUID. Sets the default context for Azure PowerShell when lo… + + Sets the "DefaultSubscriptionForLogin" config as "Name of subscription". When `Connect-AzAccount` the specified subscription will be selected as the default subscription. + + + + + + -------------------------- Example 2 -------------------------- + Update-AzConfig -DisplayBreakingChangeWarning $false -AppliesTo "Az.KeyVault" + +Key Value Applies To Scope Help Message +--- ----- ---------- ----- ------------ +DisplayBreakingChangeWarning False Az.KeyVault CurrentUser Controls if warning messages for breaking changes are displayed or suppressed. When enabled,… + + Sets the "DisplayBreakingChangeWarnings" config as "$false" for "Az.KeyVault" module. This prevents all the warning messages for upcoming breaking changes in Az.KeyVault module from prompting. + + + + + + -------------------------- Example 3 -------------------------- + Update-AzConfig -EnableDataCollection $true + +Key Value Applies To Scope Help Message +--- ----- ---------- ----- ------------ +EnableDataCollection True Az CurrentUser When enabled, Azure PowerShell cmdlets send telemetry data to Microsoft to improve the customer experi… + + Sets the "EnableDataCollection" config as "$true". This enables sending the telemetry data. Setting this config is equivalent to `Enable-AzDataCollection` and `Disable-AzDataCollection`. + + + + + + + + Online Version: + https://learn.microsoft.com/powershell/module/az.accounts/update-azconfig + + + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.Share.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.Share.dll new file mode 100644 index 000000000000..3d53eaa669dc Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.Share.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.dll new file mode 100644 index 000000000000..2443eb5dd56a Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Common.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Storage.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Storage.dll new file mode 100644 index 000000000000..a163f556b3f8 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Storage.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Strategies.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Strategies.dll new file mode 100644 index 000000000000..0ccbb5ead102 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Azure.PowerShell.Strategies.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.Azure.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.Azure.dll new file mode 100644 index 000000000000..1d99c7015912 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.Azure.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.dll new file mode 100644 index 000000000000..a4fca7488baf Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.Rest.ClientRuntime.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.WindowsAzure.Storage.DataMovement.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.WindowsAzure.Storage.DataMovement.dll new file mode 100644 index 000000000000..6ac672abd486 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.WindowsAzure.Storage.DataMovement.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.WindowsAzure.Storage.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.WindowsAzure.Storage.dll new file mode 100644 index 000000000000..70c5ed6806c6 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/Microsoft.WindowsAzure.Storage.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/PostImportScripts/LoadAuthenticators.ps1 b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/PostImportScripts/LoadAuthenticators.ps1 new file mode 100644 index 000000000000..1a6de8a08d69 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/PostImportScripts/LoadAuthenticators.ps1 @@ -0,0 +1,222 @@ +if ($PSEdition -eq 'Desktop') { + try { + [Microsoft.Azure.Commands.Profile.Utilities.CustomAssemblyResolver]::Initialize() + } catch {} +} +# SIG # Begin signature block +# MIIoPAYJKoZIhvcNAQcCoIIoLTCCKCkCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBn8ROze2QLH/c6 +# GtPhR/BPLgOtmjkNhcq+fFmu16VcrqCCDYUwggYDMIID66ADAgECAhMzAAADTU6R +# phoosHiPAAAAAANNMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI4WhcNMjQwMzE0MTg0MzI4WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDUKPcKGVa6cboGQU03ONbUKyl4WpH6Q2Xo9cP3RhXTOa6C6THltd2RfnjlUQG+ +# Mwoy93iGmGKEMF/jyO2XdiwMP427j90C/PMY/d5vY31sx+udtbif7GCJ7jJ1vLzd +# j28zV4r0FGG6yEv+tUNelTIsFmmSb0FUiJtU4r5sfCThvg8dI/F9Hh6xMZoVti+k +# bVla+hlG8bf4s00VTw4uAZhjGTFCYFRytKJ3/mteg2qnwvHDOgV7QSdV5dWdd0+x +# zcuG0qgd3oCCAjH8ZmjmowkHUe4dUmbcZfXsgWlOfc6DG7JS+DeJak1DvabamYqH +# g1AUeZ0+skpkwrKwXTFwBRltAgMBAAGjggGCMIIBfjAfBgNVHSUEGDAWBgorBgEE +# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUId2Img2Sp05U6XI04jli2KohL+8w +# VAYDVR0RBE0wS6RJMEcxLTArBgNVBAsTJE1pY3Jvc29mdCBJcmVsYW5kIE9wZXJh +# dGlvbnMgTGltaXRlZDEWMBQGA1UEBRMNMjMwMDEyKzUwMDUxNzAfBgNVHSMEGDAW +# gBRIbmTlUAXTgqoXNzcitW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8v +# d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIw +# MTEtMDctMDguY3JsMGEGCCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDov +# L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDEx +# XzIwMTEtMDctMDguY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIB +# ACMET8WuzLrDwexuTUZe9v2xrW8WGUPRQVmyJ1b/BzKYBZ5aU4Qvh5LzZe9jOExD +# YUlKb/Y73lqIIfUcEO/6W3b+7t1P9m9M1xPrZv5cfnSCguooPDq4rQe/iCdNDwHT +# 6XYW6yetxTJMOo4tUDbSS0YiZr7Mab2wkjgNFa0jRFheS9daTS1oJ/z5bNlGinxq +# 2v8azSP/GcH/t8eTrHQfcax3WbPELoGHIbryrSUaOCphsnCNUqUN5FbEMlat5MuY +# 94rGMJnq1IEd6S8ngK6C8E9SWpGEO3NDa0NlAViorpGfI0NYIbdynyOB846aWAjN +# fgThIcdzdWFvAl/6ktWXLETn8u/lYQyWGmul3yz+w06puIPD9p4KPiWBkCesKDHv +# XLrT3BbLZ8dKqSOV8DtzLFAfc9qAsNiG8EoathluJBsbyFbpebadKlErFidAX8KE +# usk8htHqiSkNxydamL/tKfx3V/vDAoQE59ysv4r3pE+zdyfMairvkFNNw7cPn1kH +# Gcww9dFSY2QwAxhMzmoM0G+M+YvBnBu5wjfxNrMRilRbxM6Cj9hKFh0YTwba6M7z +# ntHHpX3d+nabjFm/TnMRROOgIXJzYbzKKaO2g1kWeyG2QtvIR147zlrbQD4X10Ab +# rRg9CpwW7xYxywezj+iNAc+QmFzR94dzJkEPUSCJPsTFMIIHejCCBWKgAwIBAgIK +# YQ6Q0gAAAAAAAzANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNV +# BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv +# c29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlm +# aWNhdGUgQXV0aG9yaXR5IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEw +# OTA5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE +# BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYD +# VQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG +# 9w0BAQEFAAOCAg8AMIICCgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+la +# UKq4BjgaBEm6f8MMHt03a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc +# 6Whe0t+bU7IKLMOv2akrrnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4D +# dato88tt8zpcoRb0RrrgOGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+ +# lD3v++MrWhAfTVYoonpy4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nk +# kDstrjNYxbc+/jLTswM9sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6 +# A4aN91/w0FK/jJSHvMAhdCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmd +# X4jiJV3TIUs+UsS1Vz8kA/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL +# 5zmhD+kjSbwYuER8ReTBw3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zd +# sGbiwZeBe+3W7UvnSSmnEyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3 +# T8HhhUSJxAlMxdSlQy90lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS +# 4NaIjAsCAwEAAaOCAe0wggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRI +# bmTlUAXTgqoXNzcitW2oynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTAL +# BgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBD +# uRQFTuHqp8cx0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jv +# c29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf +# MDNfMjIuY3JsMF4GCCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3 +# dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf +# MDNfMjIuY3J0MIGfBgNVHSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEF +# BQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1h +# cnljcHMuaHRtMEAGCCsGAQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkA +# YwB5AF8AcwB0AGEAdABlAG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn +# 8oalmOBUeRou09h0ZyKbC5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7 +# v0epo/Np22O/IjWll11lhJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0b +# pdS1HXeUOeLpZMlEPXh6I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/ +# KmtYSWMfCWluWpiW5IP0wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvy +# CInWH8MyGOLwxS3OW560STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBp +# mLJZiWhub6e3dMNABQamASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJi +# hsMdYzaXht/a8/jyFqGaJ+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYb +# BL7fQccOKO7eZS/sl/ahXJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbS +# oqKfenoi+kiVH6v7RyOA9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sL +# gOppO6/8MO0ETI7f33VtY5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtX +# cVZOSEXAQsmbdlsKgEhr/Xmfwb1tbWrJUnMTDXpQzTGCGg0wghoJAgEBMIGVMH4x +# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt +# b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01p +# Y3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTECEzMAAANNTpGmGiiweI8AAAAA +# A00wDQYJYIZIAWUDBAIBBQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQw +# HAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIC8M +# Xy0xGn+XGeN5xhSUhsVdQGTLtuHOS5+U3UgQ1k53MEIGCisGAQQBgjcCAQwxNDAy +# oBSAEgBNAGkAYwByAG8AcwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20wDQYJKoZIhvcNAQEBBQAEggEAf/y9IwVq9QTOrbQE7i6AVISmUE6gxgH9PaqX +# D6xL8+9cpj9Y6/kfZ6Zw1Z04+XY4c5dhmIJuWcRjx+i5yXFmp0fyaDfNpalcQlJv +# 1yplKVfyAsVpod7RIH4YvrwP2c/gvYSLRF9k1a/QyIT4yTfPFGaR42tZ0MAyWHhz +# t5ZdXN3dPJt865YoEzv7pPZN29w4mjfr78s6XxeYYARLHPdw/rChVioeia9TyNl9 +# QCKfm9Kar9oDLel2pMgRuonn40KhF85e93XvVLO1PMGXzljlkGWY7PmHuXiOJeyS +# xOe/+p56sTLtL2yIjl/8SDLVGi7LJ7Y93hQGv9yd8U9Tio/mVqGCF5cwgheTBgor +# BgEEAYI3AwMBMYIXgzCCF38GCSqGSIb3DQEHAqCCF3AwghdsAgEDMQ8wDQYJYIZI +# AWUDBAIBBQAwggFSBgsqhkiG9w0BCRABBKCCAUEEggE9MIIBOQIBAQYKKwYBBAGE +# WQoDATAxMA0GCWCGSAFlAwQCAQUABCAkPO6Va7JVENY1DGO3Rgl+LBuXva2N4CJh +# CxPTspOx1QIGZQP2LMVBGBMyMDIzMDkyMDA1NTA0NC41MDZaMASAAgH0oIHRpIHO +# MIHLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH +# UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQL +# ExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxk +# IFRTUyBFU046OEQwMC0wNUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1l +# LVN0YW1wIFNlcnZpY2WgghHtMIIHIDCCBQigAwIBAgITMwAAAc1VByrnysGZHQAB +# AAABzTANBgkqhkiG9w0BAQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz +# aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENv +# cnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAx +# MDAeFw0yMzA1MjUxOTEyMDVaFw0yNDAyMDExOTEyMDVaMIHLMQswCQYDVQQGEwJV +# UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE +# ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1l +# cmljYSBPcGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046OEQwMC0w +# NUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2Uw +# ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDTOCLVS2jmEWOqxzygW7s6 +# YLmm29pjvA+Ch6VL7HlTL8yUt3Z0KIzTa2O/Hvr/aJza1qEVklq7NPiOrpBAIz65 +# 7LVxwEc4BxJiv6B68a8DQiF6WAFFNaK3WHi7TfxRnqLohgNz7vZPylZQX795r8MQ +# vX56uwjj/R4hXnR7Na4Llu4mWsml/wp6VJqCuxZnu9jX4qaUxngcrfFT7+zvlXCl +# wLah2n0eGKna1dOjOgyK00jYq5vtzr5NZ+qVxqaw9DmEsj9vfqYkfQZry2JO5wmg +# XX79Ox7PLMUfqT4+8w5JkdSMoX32b1D6cDKWRUv5qjiYh4o/a9ehE/KAkUWlSPbb +# DR/aGnPJLAGPy2qA97YCBeeIJjRKURgdPlhE5O46kOju8nYJnIvxbuC2Qp2jxwc6 +# rD9M6Pvc8sZIcQ10YKZVYKs94YPSlkhwXwttbRY+jZnQiDm2ZFjH8SPe1I6ERcfe +# YX1zCYjEzdwWcm+fFZmlJA9HQW7ZJAmOECONtfK28EREEE5yzq+T3QMVPhiEfEhg +# cYsh0DeoWiYGsDiKEuS+FElMMyT456+U2ZRa2hbRQ97QcbvaAd6OVQLp3TQqNEu0 +# es5Zq0wg2CADf+QKQR/Y6+fGgk9qJNJW3Mu771KthuPlNfKss0B1zh0xa1yN4qC3 +# zoE9Uq6T8r7G3/OtSFms4wIDAQABo4IBSTCCAUUwHQYDVR0OBBYEFKGT+aY2aZrB +# AJVIZh5kicokfNWaMB8GA1UdIwQYMBaAFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMF8G +# A1UdHwRYMFYwVKBSoFCGTmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMv +# Y3JsL01pY3Jvc29mdCUyMFRpbWUtU3RhbXAlMjBQQ0ElMjAyMDEwKDEpLmNybDBs +# BggrBgEFBQcBAQRgMF4wXAYIKwYBBQUHMAKGUGh0dHA6Ly93d3cubWljcm9zb2Z0 +# LmNvbS9wa2lvcHMvY2VydHMvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUy +# MDIwMTAoMSkuY3J0MAwGA1UdEwEB/wQCMAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUH +# AwgwDgYDVR0PAQH/BAQDAgeAMA0GCSqGSIb3DQEBCwUAA4ICAQBSqG3ppKIU+i/E +# MwwtotoxnKfw0SX/3T16EPbjwsAImWOZ5nLAbatopl8zFY841gb5eiL1j81h4DiE +# iXt+BJgHIA2LIhKhSscd79oMbr631DiEqf9X5LZR3V3KIYstU3K7f5Dk7tbobuHu +# +6fYM/gOx44sgRU7YQ+YTYHvv8k4mMnuiahJRlU/F2vavcHU5uhXi078K4nSRAPn +# WyX7gVi6iVMBBUF4823oPFznEcHup7VNGRtGe1xvnlMd1CuyxctM8d/oqyTsxwlJ +# AM5F/lDxnEWoSzAkad1nWvkaAeMV7+39IpXhuf9G3xbffKiyBnj3cQeiA4SxSwCd +# nx00RBlXS6r9tGDa/o9RS01FOABzKkP5CBDpm4wpKdIU74KtBH2sE5QYYn7liYWZ +# r2f/U+ghTmdOEOPkXEcX81H4dRJU28Tj/gUZdwL81xah8Kn+cB7vM/Hs3/J8tF13 +# ZPP+8NtX3vu4NrchHDJYgjOi+1JuSf+4jpF/pEEPXp9AusizmSmkBK4iVT7NwVtR +# nS1ts8qAGHGPg2HPa4b2u9meueUoqNVtMhbumI1y+d9ZkThNXBXz2aItT2C99DM3 +# T3qYqAUmvKUryVSpMLVpse4je5WN6VVlCDFKWFRH202YxEVWsZ5baN9CaqCbCS0E +# a7s9OFLaEM5fNn9m5s69lD/ekcW2qTCCB3EwggVZoAMCAQICEzMAAAAVxedrngKb +# SZkAAAAAABUwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQI +# EwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3Nv +# ZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRpZmlj +# YXRlIEF1dGhvcml0eSAyMDEwMB4XDTIxMDkzMDE4MjIyNVoXDTMwMDkzMDE4MzIy +# NVowfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT +# B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UE +# AxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwggIiMA0GCSqGSIb3DQEB +# AQUAA4ICDwAwggIKAoICAQDk4aZM57RyIQt5osvXJHm9DtWC0/3unAcH0qlsTnXI +# yjVX9gF/bErg4r25PhdgM/9cT8dm95VTcVrifkpa/rg2Z4VGIwy1jRPPdzLAEBjo +# YH1qUoNEt6aORmsHFPPFdvWGUNzBRMhxXFExN6AKOG6N7dcP2CZTfDlhAnrEqv1y +# aa8dq6z2Nr41JmTamDu6GnszrYBbfowQHJ1S/rboYiXcag/PXfT+jlPP1uyFVk3v +# 3byNpOORj7I5LFGc6XBpDco2LXCOMcg1KL3jtIckw+DJj361VI/c+gVVmG1oO5pG +# ve2krnopN6zL64NF50ZuyjLVwIYwXE8s4mKyzbnijYjklqwBSru+cakXW2dg3viS +# kR4dPf0gz3N9QZpGdc3EXzTdEonW/aUgfX782Z5F37ZyL9t9X4C626p+Nuw2TPYr +# bqgSUei/BQOj0XOmTTd0lBw0gg/wEPK3Rxjtp+iZfD9M269ewvPV2HM9Q07BMzlM +# jgK8QmguEOqEUUbi0b1qGFphAXPKZ6Je1yh2AuIzGHLXpyDwwvoSCtdjbwzJNmSL +# W6CmgyFdXzB0kZSU2LlQ+QuJYfM2BjUYhEfb3BvR/bLUHMVr9lxSUV0S2yW6r1AF +# emzFER1y7435UsSFF5PAPBXbGjfHCBUYP3irRbb1Hode2o+eFnJpxq57t7c+auIu +# rQIDAQABo4IB3TCCAdkwEgYJKwYBBAGCNxUBBAUCAwEAATAjBgkrBgEEAYI3FQIE +# FgQUKqdS/mTEmr6CkTxGNSnPEP8vBO4wHQYDVR0OBBYEFJ+nFV0AXmJdg/Tl0mWn +# G1M1GelyMFwGA1UdIARVMFMwUQYMKwYBBAGCN0yDfQEBMEEwPwYIKwYBBQUHAgEW +# M2h0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5 +# Lmh0bTATBgNVHSUEDDAKBggrBgEFBQcDCDAZBgkrBgEEAYI3FAIEDB4KAFMAdQBi +# AEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTV +# 9lbLj+iiXGJo0T2UkFvXzpoYxDBWBgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3Js +# Lm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXRfMjAx +# MC0wNi0yMy5jcmwwWgYIKwYBBQUHAQEETjBMMEoGCCsGAQUFBzAChj5odHRwOi8v +# d3d3Lm1pY3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dF8yMDEwLTA2 +# LTIzLmNydDANBgkqhkiG9w0BAQsFAAOCAgEAnVV9/Cqt4SwfZwExJFvhnnJL/Klv +# 6lwUtj5OR2R4sQaTlz0xM7U518JxNj/aZGx80HU5bbsPMeTCj/ts0aGUGCLu6WZn +# OlNN3Zi6th542DYunKmCVgADsAW+iehp4LoJ7nvfam++Kctu2D9IdQHZGN5tggz1 +# bSNU5HhTdSRXud2f8449xvNo32X2pFaq95W2KFUn0CS9QKC/GbYSEhFdPSfgQJY4 +# rPf5KYnDvBewVIVCs/wMnosZiefwC2qBwoEZQhlSdYo2wh3DYXMuLGt7bj8sCXgU +# 6ZGyqVvfSaN0DLzskYDSPeZKPmY7T7uG+jIa2Zb0j/aRAfbOxnT99kxybxCrdTDF +# NLB62FD+CljdQDzHVG2dY3RILLFORy3BFARxv2T5JL5zbcqOCb2zAVdJVGTZc9d/ +# HltEAY5aGZFrDZ+kKNxnGSgkujhLmm77IVRrakURR6nxt67I6IleT53S0Ex2tVdU +# CbFpAUR+fKFhbHP+CrvsQWY9af3LwUFJfn6Tvsv4O+S3Fb+0zj6lMVGEvL8CwYKi +# excdFYmNcP7ntdAoGokLjzbaukz5m/8K6TT4JDVnK+ANuOaMmdbhIurwJ0I9JZTm +# dHRbatGePu1+oDEzfbzL6Xu/OHBE0ZDxyKs6ijoIYn/ZcGNTTY3ugm2lBRDBcQZq +# ELQdVTNYs6FwZvKhggNQMIICOAIBATCB+aGB0aSBzjCByzELMAkGA1UEBhMCVVMx +# EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT +# FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJp +# Y2EgT3BlcmF0aW9uczEnMCUGA1UECxMeblNoaWVsZCBUU1MgRVNOOjhEMDAtMDVF +# MC1EOTQ3MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMK +# AQEwBwYFKw4DAhoDFQBoqfem2KKzuRZjISYifGolVOdyBKCBgzCBgKR+MHwxCzAJ +# BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25k +# MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jv +# c29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMA0GCSqGSIb3DQEBCwUAAgUA6LRjDzAi +# GA8yMDIzMDkxOTE4MTIzMVoYDzIwMjMwOTIwMTgxMjMxWjB3MD0GCisGAQQBhFkK +# BAExLzAtMAoCBQDotGMPAgEAMAoCAQACAhpaAgH/MAcCAQACAhNWMAoCBQDotbSP +# AgEAMDYGCisGAQQBhFkKBAIxKDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSCh +# CjAIAgEAAgMBhqAwDQYJKoZIhvcNAQELBQADggEBALTbRIUnATvJxQER3PTF/m7f +# ea2mmC38vdy89JNDWbAETiN+HOhqZRgyGz1otnOANH++7NjRRSrh8byXARE8w1dN +# AVpbbjDea3JZt2zTkA6uRN/vjuifXHSz470WR6P8Mm3KhMtOK4AYLam5Xe1bnjAv +# JU02cI0r1MUOqkWJa/2Il+9Dm1raxizVGFUvgSLHDgxpFgfins0MBOg4RQTpRDIP +# arFUPTmbFhZfTBa2DAiHGcy9hPO1pNUY3FKdAMYkRxt9CAodlmkueGu6oiSxRd3M +# TPqGHQx9pJzJuE6yM0SZO/J0O5PnHIRc7RMdy0XikWk8D3SmDYFQOOxk7noeloYx +# ggQNMIIECQIBATCBkzB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3Rv +# bjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0 +# aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAITMwAA +# Ac1VByrnysGZHQABAAABzTANBglghkgBZQMEAgEFAKCCAUowGgYJKoZIhvcNAQkD +# MQ0GCyqGSIb3DQEJEAEEMC8GCSqGSIb3DQEJBDEiBCDMuF7QDQHme8LEs4NWCnOa +# 8jbgJtGZELxoEEYiDH+efzCB+gYLKoZIhvcNAQkQAi8xgeowgecwgeQwgb0EIOJm +# pfitVr1PZGgvTEdTpStUc6GNh7LNroQBKwpURpkKMIGYMIGApH4wfDELMAkGA1UE +# BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAc +# BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0 +# IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAHNVQcq58rBmR0AAQAAAc0wIgQgpXNo +# CR5udEHFtsK4vRweYQG6+tUY8EhPATlSEIELPDswDQYJKoZIhvcNAQELBQAEggIA +# iFTcLZ0vwFJzK+Rqanq7AynGwJuFJLGY6whQgWb+a8jLVtlCBrd5w36Xa3DfTbUO +# KSNVOq3JahGUSLZwnfm69YOiH8xujOMozBs7lgnTwoEfFchjFhGxMUxjC7YVuqph +# 82Q6e/qzSHMhNsbVoL7G/EA9lGIQ2rjxiREnh5IbiAvrrYyYrIHUGux7U/gXUE3W +# UzXMCNAuQrAXgC1I4CRfv8gRR1D1Zf27juawIsubcJ+X4NsHsrZlUChB4Jvcli5U +# +0BHtqXZl0jesLtdnxXcZQrZR8N5yMAr+J9ozW4F5l/Nw/K3JO/5XeR3tGjTpKWT +# qd9YPyvhJpn7WJGeOb60ahoyNkCPjdJXCfx7tMRYztCzlQVkqsbZmaWXAOPBpCJy +# KJW7TTHceNGuQxTbZ62LPX+3X+Li0I5QL+fN/CyvajxlbkONe6p7mEO1GwyEoBHK +# aK7p3pH45Fyn9pedZpWRnwNKFCtm7xIGrjD8dwh/SKnQQn0UZCOm6Z2MTA2dexh5 +# tckF0e9H6wsS2ty7bQjaxuIu7bRVIOv7N58yLZvZ/JpjuxTXTxJuxPmlAsBq4DPk +# 6oHV7zY0K9mbyoGUw0Hie5ZW+i15UGOQYjt9ORg38GLgv4mt3o4v78J0X1HTWDGt +# IKZzmt/ZsnE2gTde52Wujm56LnstUoCXuTKlLP5MTGA= +# SIG # End signature block diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/StartupScripts/AzError.ps1 b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/StartupScripts/AzError.ps1 new file mode 100644 index 000000000000..5379b99cf34a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/StartupScripts/AzError.ps1 @@ -0,0 +1,281 @@ +function Write-InstallationCheckToFile +{ + Param($installationchecks) + if (Get-Module AzureRM.Profile -ListAvailable -ErrorAction Ignore) + { + Write-Warning ("Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide") + } + + $installationchecks.Add("AzSideBySideCheck","true") + try + { + if (Test-Path $pathToInstallationChecks -ErrorAction Ignore) + { + Remove-Item -Path $pathToInstallationChecks -ErrorAction Stop + } + + $pathToInstallDir = Split-Path -Path $pathToInstallationChecks -Parent -ErrorAction Stop + if (Test-Path $pathToInstallDir -ErrorAction Ignore) + { + New-Item -Path $pathToInstallationChecks -ErrorAction Stop -ItemType File -Value ($installationchecks | ConvertTo-Json -ErrorAction Stop) + } + } + catch + { + Write-Verbose "Installation checks failed to write to file." + } +} + +if (!($env:SkipAzInstallationChecks -eq "true")) +{ + $pathToInstallationChecks = Join-Path (Join-Path $HOME ".Azure") "AzInstallationChecks.json" + $installationchecks = @{} + if (!(Test-Path $pathToInstallationChecks -ErrorAction Ignore)) + { + Write-InstallationCheckToFile $installationchecks + } + else + { + try + { + ((Get-Content $pathToInstallationChecks -ErrorAction Stop) | ConvertFrom-Json -ErrorAction Stop).PSObject.Properties | Foreach { $installationchecks[$_.Name] = $_.Value } + } + catch + { + Write-InstallationCheckToFile $installationchecks + } + + if (!$installationchecks.ContainsKey("AzSideBySideCheck")) + { + Write-InstallationCheckToFile $installationchecks + } + } +} + +if (Get-Module AzureRM.profile -ErrorAction Ignore) +{ + Write-Warning ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") + throw ("AzureRM.Profile already loaded. Az and AzureRM modules cannot be imported in the same session or used in the same script or runbook. If you are running PowerShell in an environment you control you can use the 'Uninstall-AzureRm' cmdlet to remove all AzureRm modules from your machine. " + + "If you are running in Azure Automation, take care that none of your runbooks import both Az and AzureRM modules. More information can be found here: https://aka.ms/azps-migration-guide.") +} + +Update-TypeData -AppendPath (Join-Path (Get-Item $PSScriptRoot).Parent.FullName Accounts.types.ps1xml) -ErrorAction Ignore +# SIG # Begin signature block +# MIIoPAYJKoZIhvcNAQcCoIIoLTCCKCkCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDT3s8rOGw0kP8l +# AbYXJ7G9hr2fOKBRtW5xO6fWVEOZvqCCDYUwggYDMIID66ADAgECAhMzAAADTU6R +# phoosHiPAAAAAANNMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI4WhcNMjQwMzE0MTg0MzI4WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDUKPcKGVa6cboGQU03ONbUKyl4WpH6Q2Xo9cP3RhXTOa6C6THltd2RfnjlUQG+ +# Mwoy93iGmGKEMF/jyO2XdiwMP427j90C/PMY/d5vY31sx+udtbif7GCJ7jJ1vLzd +# j28zV4r0FGG6yEv+tUNelTIsFmmSb0FUiJtU4r5sfCThvg8dI/F9Hh6xMZoVti+k +# bVla+hlG8bf4s00VTw4uAZhjGTFCYFRytKJ3/mteg2qnwvHDOgV7QSdV5dWdd0+x +# zcuG0qgd3oCCAjH8ZmjmowkHUe4dUmbcZfXsgWlOfc6DG7JS+DeJak1DvabamYqH +# g1AUeZ0+skpkwrKwXTFwBRltAgMBAAGjggGCMIIBfjAfBgNVHSUEGDAWBgorBgEE +# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUId2Img2Sp05U6XI04jli2KohL+8w +# VAYDVR0RBE0wS6RJMEcxLTArBgNVBAsTJE1pY3Jvc29mdCBJcmVsYW5kIE9wZXJh +# dGlvbnMgTGltaXRlZDEWMBQGA1UEBRMNMjMwMDEyKzUwMDUxNzAfBgNVHSMEGDAW +# gBRIbmTlUAXTgqoXNzcitW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8v +# d3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIw +# MTEtMDctMDguY3JsMGEGCCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDov +# L3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDEx +# XzIwMTEtMDctMDguY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIB +# ACMET8WuzLrDwexuTUZe9v2xrW8WGUPRQVmyJ1b/BzKYBZ5aU4Qvh5LzZe9jOExD +# YUlKb/Y73lqIIfUcEO/6W3b+7t1P9m9M1xPrZv5cfnSCguooPDq4rQe/iCdNDwHT +# 6XYW6yetxTJMOo4tUDbSS0YiZr7Mab2wkjgNFa0jRFheS9daTS1oJ/z5bNlGinxq +# 2v8azSP/GcH/t8eTrHQfcax3WbPELoGHIbryrSUaOCphsnCNUqUN5FbEMlat5MuY +# 94rGMJnq1IEd6S8ngK6C8E9SWpGEO3NDa0NlAViorpGfI0NYIbdynyOB846aWAjN +# fgThIcdzdWFvAl/6ktWXLETn8u/lYQyWGmul3yz+w06puIPD9p4KPiWBkCesKDHv +# XLrT3BbLZ8dKqSOV8DtzLFAfc9qAsNiG8EoathluJBsbyFbpebadKlErFidAX8KE +# usk8htHqiSkNxydamL/tKfx3V/vDAoQE59ysv4r3pE+zdyfMairvkFNNw7cPn1kH +# Gcww9dFSY2QwAxhMzmoM0G+M+YvBnBu5wjfxNrMRilRbxM6Cj9hKFh0YTwba6M7z +# ntHHpX3d+nabjFm/TnMRROOgIXJzYbzKKaO2g1kWeyG2QtvIR147zlrbQD4X10Ab +# rRg9CpwW7xYxywezj+iNAc+QmFzR94dzJkEPUSCJPsTFMIIHejCCBWKgAwIBAgIK +# YQ6Q0gAAAAAAAzANBgkqhkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNV +# BAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv +# c29mdCBDb3Jwb3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlm +# aWNhdGUgQXV0aG9yaXR5IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEw +# OTA5WjB+MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE +# BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYD +# VQQDEx9NaWNyb3NvZnQgQ29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG +# 9w0BAQEFAAOCAg8AMIICCgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+la +# UKq4BjgaBEm6f8MMHt03a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc +# 6Whe0t+bU7IKLMOv2akrrnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4D +# dato88tt8zpcoRb0RrrgOGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+ +# lD3v++MrWhAfTVYoonpy4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nk +# kDstrjNYxbc+/jLTswM9sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6 +# A4aN91/w0FK/jJSHvMAhdCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmd +# X4jiJV3TIUs+UsS1Vz8kA/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL +# 5zmhD+kjSbwYuER8ReTBw3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zd +# sGbiwZeBe+3W7UvnSSmnEyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3 +# T8HhhUSJxAlMxdSlQy90lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS +# 4NaIjAsCAwEAAaOCAe0wggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRI +# bmTlUAXTgqoXNzcitW2oynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTAL +# BgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBD +# uRQFTuHqp8cx0SOJNDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jv +# c29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf +# MDNfMjIuY3JsMF4GCCsGAQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3 +# dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFf +# MDNfMjIuY3J0MIGfBgNVHSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEF +# BQcCARYzaHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1h +# cnljcHMuaHRtMEAGCCsGAQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkA +# YwB5AF8AcwB0AGEAdABlAG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn +# 8oalmOBUeRou09h0ZyKbC5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7 +# v0epo/Np22O/IjWll11lhJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0b +# pdS1HXeUOeLpZMlEPXh6I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/ +# KmtYSWMfCWluWpiW5IP0wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvy +# CInWH8MyGOLwxS3OW560STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBp +# mLJZiWhub6e3dMNABQamASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJi +# hsMdYzaXht/a8/jyFqGaJ+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYb +# BL7fQccOKO7eZS/sl/ahXJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbS +# oqKfenoi+kiVH6v7RyOA9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sL +# gOppO6/8MO0ETI7f33VtY5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtX +# cVZOSEXAQsmbdlsKgEhr/Xmfwb1tbWrJUnMTDXpQzTGCGg0wghoJAgEBMIGVMH4x +# CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRt +# b25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01p +# Y3Jvc29mdCBDb2RlIFNpZ25pbmcgUENBIDIwMTECEzMAAANNTpGmGiiweI8AAAAA +# A00wDQYJYIZIAWUDBAIBBQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQw +# HAYKKwYBBAGCNwIBCzEOMAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIKR+ +# w/DaLVp8ra2PXQQVXZI6DyW6fyW+fzmibTR/vTxzMEIGCisGAQQBgjcCAQwxNDAy +# oBSAEgBNAGkAYwByAG8AcwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20wDQYJKoZIhvcNAQEBBQAEggEAAJ/05iL6/mTJTdXlA3WMNU7DPdukKaJDMocn +# pzyB1C0hLB0o81xP7YSAsUBDAKzunfQ+oBNu6n/owxsHxw8C5aiDdeX87DkrwFEN +# 6Y0/kc3H3LpC+ll1Aq78ia85raDdogkMJNqAZOpaSs/+WPQGmTqATI3FTxjzviyB +# W2d09blFshgmPNB4IKNWZrf0xAZjugWcVe7WjbSnrf9C6Uap/yfFjAm1D+Am86Dy +# 9UYWjaxYSdiYj39a4rawSz2+47doMiSNWEdRzLBWQ3mhzG79emCceHwhCMof3KYZ +# WbXjXm+C738l48ZuzZ50X/w2B7jWQCLLiIdIY0Nczh9n7W+R8qGCF5cwgheTBgor +# BgEEAYI3AwMBMYIXgzCCF38GCSqGSIb3DQEHAqCCF3AwghdsAgEDMQ8wDQYJYIZI +# AWUDBAIBBQAwggFSBgsqhkiG9w0BCRABBKCCAUEEggE9MIIBOQIBAQYKKwYBBAGE +# WQoDATAxMA0GCWCGSAFlAwQCAQUABCDTxg5YDL/sFFSkwNmajR/hD+zpUa9/iONc +# c1T6Gn07AgIGZQPtxMFeGBMyMDIzMDkyMDA1NTA0My40MTNaMASAAgH0oIHRpIHO +# MIHLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMH +# UmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQL +# ExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxk +# IFRTUyBFU046QTAwMC0wNUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1l +# LVN0YW1wIFNlcnZpY2WgghHtMIIHIDCCBQigAwIBAgITMwAAAdB3CKrvoxfG3QAB +# AAAB0DANBgkqhkiG9w0BAQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz +# aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENv +# cnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAx +# MDAeFw0yMzA1MjUxOTEyMTRaFw0yNDAyMDExOTEyMTRaMIHLMQswCQYDVQQGEwJV +# UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE +# ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1l +# cmljYSBPcGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046QTAwMC0w +# NUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2Uw +# ggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDfMlfn35fvM0XAUSmI5qiG +# 0UxPi25HkSyBgzk3zpYO311d1OEEFz0QpAK23s1dJFrjB5gD+SMw5z6EwxC4CrXU +# 9KaQ4WNHqHrhWftpgo3MkJex9frmO9MldUfjUG56sIW6YVF6YjX+9rT1JDdCDHbo +# 5nZiasMigGKawGb2HqD7/kjRR67RvVh7Q4natAVu46Zf5MLviR0xN5cNG20xwBwg +# ttaYEk5XlULaBH5OnXz2eWoIx+SjDO7Bt5BuABWY8SvmRQfByT2cppEzTjt/fs0x +# p4B1cAHVDwlGwZuv9Rfc3nddxgFrKA8MWHbJF0+aWUUYIBR8Fy2guFVHoHeOze7I +# sbyvRrax//83gYqo8c5Z/1/u7kjLcTgipiyZ8XERsLEECJ5ox1BBLY6AjmbgAzDd +# Nl2Leej+qIbdBr/SUvKEC+Xw4xjFMOTUVWKWemt2khwndUfBNR7Nzu1z9L0Wv7TA +# Y/v+v6pNhAeohPMCFJc+ak6uMD8TKSzWFjw5aADkmD9mGuC86yvSKkII4MayzoUd +# seT0nfk8Y0fPjtdw2Wnejl6zLHuYXwcDau2O1DMuoiedNVjTF37UEmYT+oxC/OFX +# UGPDEQt9tzgbR9g8HLtUfEeWOsOED5xgb5rwyfvIss7H/cdHFcIiIczzQgYnsLyE +# GepoZDkKhSMR5eCB6Kcv/QIDAQABo4IBSTCCAUUwHQYDVR0OBBYEFDPhAYWS0oA+ +# lOtITfjJtyl0knRRMB8GA1UdIwQYMBaAFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMF8G +# A1UdHwRYMFYwVKBSoFCGTmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMv +# Y3JsL01pY3Jvc29mdCUyMFRpbWUtU3RhbXAlMjBQQ0ElMjAyMDEwKDEpLmNybDBs +# BggrBgEFBQcBAQRgMF4wXAYIKwYBBQUHMAKGUGh0dHA6Ly93d3cubWljcm9zb2Z0 +# LmNvbS9wa2lvcHMvY2VydHMvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUy +# MDIwMTAoMSkuY3J0MAwGA1UdEwEB/wQCMAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUH +# AwgwDgYDVR0PAQH/BAQDAgeAMA0GCSqGSIb3DQEBCwUAA4ICAQCXh+ckCkZaA06S +# NW+qxtS9gHQp4x7G+gdikngKItEr8otkXIrmWPYrarRWBlY91lqGiilHyIlZ3iNB +# UbaNEmaKAGMZ5YcS7IZUKPaq1jU0msyl+8og0t9C/Z26+atx3vshHrFQuSgwTHZV +# pzv7k8CYnBYoxdhI1uGhqH595mqLvtMsxEN/1so7U+b3U6LCry5uwwcz5+j8Oj0G +# UX3b+iZg+As0xTN6T0Qa8BNec/LwcyqYNEaMkW2VAKrmhvWH8OCDTcXgONnnABQH +# BfXK/fLAbHFGS1XNOtr62/iaHBGAkrCGl6Bi8Pfws6fs+w+sE9r3hX9Vg0gsRMoH +# RuMaiXsrGmGsuYnLn3AwTguMatw9R8U5vJtWSlu1CFO5P0LEvQQiMZ12sQSsQAkN +# DTs9rTjVNjjIUgoZ6XPMxlcPIDcjxw8bfeb4y4wAxM2RRoWcxpkx+6IIf2L+b7gL +# HtBxXCWJ5bMW7WwUC2LltburUwBv0SgjpDtbEqw/uDgWBerCT+Zty3Nc967iGaQj +# yYQH6H/h9Xc8smm2n6VjySRx2swnW3hr6Qx63U/xY9HL6FNhrGiFED7ZRKrnwvvX +# vMVQUIEkB7GUEeN6heY8gHLt0jLV3yzDiQA8R8p5YGgGAVt9MEwgAJNY1iHvH/8v +# zhJSZFNkH8svRztO/i3TvKrjb8ZxwjCCB3EwggVZoAMCAQICEzMAAAAVxedrngKb +# SZkAAAAAABUwDQYJKoZIhvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQI +# EwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3Nv +# ZnQgQ29ycG9yYXRpb24xMjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRpZmlj +# YXRlIEF1dGhvcml0eSAyMDEwMB4XDTIxMDkzMDE4MjIyNVoXDTMwMDkzMDE4MzIy +# NVowfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT +# B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UE +# AxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIwMTAwggIiMA0GCSqGSIb3DQEB +# AQUAA4ICDwAwggIKAoICAQDk4aZM57RyIQt5osvXJHm9DtWC0/3unAcH0qlsTnXI +# yjVX9gF/bErg4r25PhdgM/9cT8dm95VTcVrifkpa/rg2Z4VGIwy1jRPPdzLAEBjo +# YH1qUoNEt6aORmsHFPPFdvWGUNzBRMhxXFExN6AKOG6N7dcP2CZTfDlhAnrEqv1y +# aa8dq6z2Nr41JmTamDu6GnszrYBbfowQHJ1S/rboYiXcag/PXfT+jlPP1uyFVk3v +# 3byNpOORj7I5LFGc6XBpDco2LXCOMcg1KL3jtIckw+DJj361VI/c+gVVmG1oO5pG +# ve2krnopN6zL64NF50ZuyjLVwIYwXE8s4mKyzbnijYjklqwBSru+cakXW2dg3viS +# kR4dPf0gz3N9QZpGdc3EXzTdEonW/aUgfX782Z5F37ZyL9t9X4C626p+Nuw2TPYr +# bqgSUei/BQOj0XOmTTd0lBw0gg/wEPK3Rxjtp+iZfD9M269ewvPV2HM9Q07BMzlM +# jgK8QmguEOqEUUbi0b1qGFphAXPKZ6Je1yh2AuIzGHLXpyDwwvoSCtdjbwzJNmSL +# W6CmgyFdXzB0kZSU2LlQ+QuJYfM2BjUYhEfb3BvR/bLUHMVr9lxSUV0S2yW6r1AF +# emzFER1y7435UsSFF5PAPBXbGjfHCBUYP3irRbb1Hode2o+eFnJpxq57t7c+auIu +# rQIDAQABo4IB3TCCAdkwEgYJKwYBBAGCNxUBBAUCAwEAATAjBgkrBgEEAYI3FQIE +# FgQUKqdS/mTEmr6CkTxGNSnPEP8vBO4wHQYDVR0OBBYEFJ+nFV0AXmJdg/Tl0mWn +# G1M1GelyMFwGA1UdIARVMFMwUQYMKwYBBAGCN0yDfQEBMEEwPwYIKwYBBQUHAgEW +# M2h0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5 +# Lmh0bTATBgNVHSUEDDAKBggrBgEFBQcDCDAZBgkrBgEEAYI3FAIEDB4KAFMAdQBi +# AEMAQTALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTV +# 9lbLj+iiXGJo0T2UkFvXzpoYxDBWBgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3Js +# Lm1pY3Jvc29mdC5jb20vcGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXRfMjAx +# MC0wNi0yMy5jcmwwWgYIKwYBBQUHAQEETjBMMEoGCCsGAQUFBzAChj5odHRwOi8v +# d3d3Lm1pY3Jvc29mdC5jb20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dF8yMDEwLTA2 +# LTIzLmNydDANBgkqhkiG9w0BAQsFAAOCAgEAnVV9/Cqt4SwfZwExJFvhnnJL/Klv +# 6lwUtj5OR2R4sQaTlz0xM7U518JxNj/aZGx80HU5bbsPMeTCj/ts0aGUGCLu6WZn +# OlNN3Zi6th542DYunKmCVgADsAW+iehp4LoJ7nvfam++Kctu2D9IdQHZGN5tggz1 +# bSNU5HhTdSRXud2f8449xvNo32X2pFaq95W2KFUn0CS9QKC/GbYSEhFdPSfgQJY4 +# rPf5KYnDvBewVIVCs/wMnosZiefwC2qBwoEZQhlSdYo2wh3DYXMuLGt7bj8sCXgU +# 6ZGyqVvfSaN0DLzskYDSPeZKPmY7T7uG+jIa2Zb0j/aRAfbOxnT99kxybxCrdTDF +# NLB62FD+CljdQDzHVG2dY3RILLFORy3BFARxv2T5JL5zbcqOCb2zAVdJVGTZc9d/ +# HltEAY5aGZFrDZ+kKNxnGSgkujhLmm77IVRrakURR6nxt67I6IleT53S0Ex2tVdU +# CbFpAUR+fKFhbHP+CrvsQWY9af3LwUFJfn6Tvsv4O+S3Fb+0zj6lMVGEvL8CwYKi +# excdFYmNcP7ntdAoGokLjzbaukz5m/8K6TT4JDVnK+ANuOaMmdbhIurwJ0I9JZTm +# dHRbatGePu1+oDEzfbzL6Xu/OHBE0ZDxyKs6ijoIYn/ZcGNTTY3ugm2lBRDBcQZq +# ELQdVTNYs6FwZvKhggNQMIICOAIBATCB+aGB0aSBzjCByzELMAkGA1UEBhMCVVMx +# EzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoT +# FU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJp +# Y2EgT3BlcmF0aW9uczEnMCUGA1UECxMeblNoaWVsZCBUU1MgRVNOOkEwMDAtMDVF +# MC1EOTQ3MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMK +# AQEwBwYFKw4DAhoDFQC8t8hT8KKUX91lU5FqRP9Cfu9MiaCBgzCBgKR+MHwxCzAJ +# BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25k +# MR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jv +# c29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMA0GCSqGSIb3DQEBCwUAAgUA6LUDNzAi +# GA8yMDIzMDkyMDA1MzU1MVoYDzIwMjMwOTIxMDUzNTUxWjB3MD0GCisGAQQBhFkK +# BAExLzAtMAoCBQDotQM3AgEAMAoCAQACAidSAgH/MAcCAQACAhN/MAoCBQDotlS3 +# AgEAMDYGCisGAQQBhFkKBAIxKDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSCh +# CjAIAgEAAgMBhqAwDQYJKoZIhvcNAQELBQADggEBAGtIWKlQ4xjkBGBgoktG9bqb +# W3uOsn29c3JcnP5Eq5RSCeHwCRLqC6bYPnrI0V6uJZGaSe/UiVRIjbQsr2Md6Liu +# 18E+/l27E3rd5NKZ4JapQ+nadT7roP/Q2NkZ+hK8kYvV+j0C2aCVDxM6KKvyfXN3 +# 9vIyVoMXXa4Htf6H6hiqbvBelUMohEcS20RXmTcQgBz/4JqhqXiIJBid/2SRudEp +# P4FKC/q7NZu0Kt9vaka5bpOjFkH8DSdsTmNhCnMsz3k60iD9L7fzqu6bIkCGeO9K +# urvs0V5kghKnZiJZ37Bwtng7KlequE58NxNKkuZrEiwepGU/NMZpgCsT31R2Qgwx +# ggQNMIIECQIBATCBkzB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3Rv +# bjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0 +# aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAITMwAA +# AdB3CKrvoxfG3QABAAAB0DANBglghkgBZQMEAgEFAKCCAUowGgYJKoZIhvcNAQkD +# MQ0GCyqGSIb3DQEJEAEEMC8GCSqGSIb3DQEJBDEiBCA5XwcAA1GbklJPMnjaBqpF +# NIgNrpeBP842Vo44Tv3PxTCB+gYLKoZIhvcNAQkQAi8xgeowgecwgeQwgb0EIAiV +# QAZftNP/Md1E2Yw+fBXa9w6fjmTZ5WAerrTSPwnXMIGYMIGApH4wfDELMAkGA1UE +# BhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAc +# BgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0 +# IFRpbWUtU3RhbXAgUENBIDIwMTACEzMAAAHQdwiq76MXxt0AAQAAAdAwIgQgqB/y +# toAW0gc8cem4mHJrpEhQ7NI8Dpr/F6zncI8TlJUwDQYJKoZIhvcNAQELBQAEggIA +# q2johekNXCez3sHPgTENMweCsqyCVgtTV3YML+gpr56aV2vz+Iuy6Bt+8tatbyVW +# ANUYA8RkAftW+u/VvBBJUl0Y/83/DHph0XoaHq0MAZ9zbVWUqU5bcocF4IbZnik9 +# rA86SRXqOrPIK/i4J2vY7dWdPdhV6C8E2jBL0Lx/qiunv2BZy4DfptkRznVY5eRG +# jOcAhlr0s20DS1ylsIuGNf1bloA5Cldc+ObtGVglNPXLKD50YKsCIl4zshQEwubA +# 42PPlGpDcH8JfZAH/ckamL/wQhCi4UdZlVR7NVSMJ19oDlV3Y2ybLw7pVs6UJsqi +# DSzEdW+634lbvORxEWsOeok0J1tlgjjUGhPjMdFh/96qcqPnInvHqvYOcmVUFfYL +# HnquWfMQxvcHyLni96fLcsfGDGsUaNNjSx4vmaIYJknwCadjHIJyChjhYNQb00bz +# aHP6UJDZf2ZcRhuaKdMGV3lWH2Wens4zDgoYSW0iES9FkqIHGh3vy2knZ2CDrY7w +# BdB8PrTm9I7XVen1DEeXtoLusGLn08Jf9UnSXoBq6hptFUJi718OsfXPN26u9/3M +# IKxkdPyvj7pir1X9GaZMyz6eCGJGGtoaBPWAYrJHXoPq/zwpRiGcbK+PLkfI8PRb +# G5flQxQzxdP1hSzAqqE+VCto96sLhASeMZ7gpL87UoQ= +# SIG # End signature block diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/StartupScripts/InitializeAssemblyResolver.ps1 b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/StartupScripts/InitializeAssemblyResolver.ps1 new file mode 100644 index 000000000000..f03e9ec7eb08 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/StartupScripts/InitializeAssemblyResolver.ps1 @@ -0,0 +1,242 @@ +$assemblyRootPath = [System.IO.Path]::Combine($PSScriptRoot, "..", "lib") +Write-Debug "Initializing ConditionalAssemblyContext. PSEdition is [$($PSVersionTable.PSEdition)]. PSVersion is [$($PSVersionTable.PSVersion)]." +$conditionalAssemblyContext = [Microsoft.Azure.PowerShell.AssemblyLoading.ConditionalAssemblyContext]::new($PSVersionTable.PSEdition, $PSVersionTable.PSVersion) +Write-Debug "Initializing ConditionalAssemblyProvider. AssemblyRootPath is [$assemblyRootPath]." +[Microsoft.Azure.PowerShell.AssemblyLoading.ConditionalAssemblyProvider]::Initialize($assemblyRootPath, $conditionalAssemblyContext) + +if ($PSEdition -eq 'Desktop') { + try { + [Microsoft.Azure.Commands.Profile.Utilities.CustomAssemblyResolver]::Initialize() + } + catch { + Write-Warning $_ + } +} +else { + try { + Add-Type -Path ([System.IO.Path]::Combine($PSScriptRoot, "..", "Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.dll")) | Out-Null + Write-Debug "Registering Az shared AssemblyLoadContext." + [Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.AzAssemblyLoadContextInitializer]::RegisterAzSharedAssemblyLoadContext() + Write-Debug "AssemblyLoadContext registered." + } + catch { + Write-Warning $_ + } +} +# SIG # Begin signature block +# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCCAe8RL2QVOwrz6 +# penupFKMe0U4FkbIX5RGfbRRPsEAcqCCDXYwggX0MIID3KADAgECAhMzAAADTrU8 +# esGEb+srAAAAAANOMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjMwMzE2MTg0MzI5WhcNMjQwMzE0MTg0MzI5WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDdCKiNI6IBFWuvJUmf6WdOJqZmIwYs5G7AJD5UbcL6tsC+EBPDbr36pFGo1bsU +# p53nRyFYnncoMg8FK0d8jLlw0lgexDDr7gicf2zOBFWqfv/nSLwzJFNP5W03DF/1 +# 1oZ12rSFqGlm+O46cRjTDFBpMRCZZGddZlRBjivby0eI1VgTD1TvAdfBYQe82fhm +# WQkYR/lWmAK+vW/1+bO7jHaxXTNCxLIBW07F8PBjUcwFxxyfbe2mHB4h1L4U0Ofa +# +HX/aREQ7SqYZz59sXM2ySOfvYyIjnqSO80NGBaz5DvzIG88J0+BNhOu2jl6Dfcq +# jYQs1H/PMSQIK6E7lXDXSpXzAgMBAAGjggFzMIIBbzAfBgNVHSUEGDAWBgorBgEE +# AYI3TAgBBggrBgEFBQcDAzAdBgNVHQ4EFgQUnMc7Zn/ukKBsBiWkwdNfsN5pdwAw +# RQYDVR0RBD4wPKQ6MDgxHjAcBgNVBAsTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEW +# MBQGA1UEBRMNMjMwMDEyKzUwMDUxNjAfBgNVHSMEGDAWgBRIbmTlUAXTgqoXNzci +# tW2oynUClTBUBgNVHR8ETTBLMEmgR6BFhkNodHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20vcGtpb3BzL2NybC9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3JsMGEG +# CCsGAQUFBwEBBFUwUzBRBggrBgEFBQcwAoZFaHR0cDovL3d3dy5taWNyb3NvZnQu +# Y29tL3BraW9wcy9jZXJ0cy9NaWNDb2RTaWdQQ0EyMDExXzIwMTEtMDctMDguY3J0 +# MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggIBAD21v9pHoLdBSNlFAjmk +# mx4XxOZAPsVxxXbDyQv1+kGDe9XpgBnT1lXnx7JDpFMKBwAyIwdInmvhK9pGBa31 +# TyeL3p7R2s0L8SABPPRJHAEk4NHpBXxHjm4TKjezAbSqqbgsy10Y7KApy+9UrKa2 +# kGmsuASsk95PVm5vem7OmTs42vm0BJUU+JPQLg8Y/sdj3TtSfLYYZAaJwTAIgi7d +# hzn5hatLo7Dhz+4T+MrFd+6LUa2U3zr97QwzDthx+RP9/RZnur4inzSQsG5DCVIM +# pA1l2NWEA3KAca0tI2l6hQNYsaKL1kefdfHCrPxEry8onJjyGGv9YKoLv6AOO7Oh +# JEmbQlz/xksYG2N/JSOJ+QqYpGTEuYFYVWain7He6jgb41JbpOGKDdE/b+V2q/gX +# UgFe2gdwTpCDsvh8SMRoq1/BNXcr7iTAU38Vgr83iVtPYmFhZOVM0ULp/kKTVoir +# IpP2KCxT4OekOctt8grYnhJ16QMjmMv5o53hjNFXOxigkQWYzUO+6w50g0FAeFa8 +# 5ugCCB6lXEk21FFB1FdIHpjSQf+LP/W2OV/HfhC3uTPgKbRtXo83TZYEudooyZ/A +# Vu08sibZ3MkGOJORLERNwKm2G7oqdOv4Qj8Z0JrGgMzj46NFKAxkLSpE5oHQYP1H +# tPx1lPfD7iNSbJsP6LiUHXH1MIIHejCCBWKgAwIBAgIKYQ6Q0gAAAAAAAzANBgkq +# hkiG9w0BAQsFADCBiDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x +# EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv +# bjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3QgQ2VydGlmaWNhdGUgQXV0aG9yaXR5 +# IDIwMTEwHhcNMTEwNzA4MjA1OTA5WhcNMjYwNzA4MjEwOTA5WjB+MQswCQYDVQQG +# EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwG +# A1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSgwJgYDVQQDEx9NaWNyb3NvZnQg +# Q29kZSBTaWduaW5nIFBDQSAyMDExMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIIC +# CgKCAgEAq/D6chAcLq3YbqqCEE00uvK2WCGfQhsqa+laUKq4BjgaBEm6f8MMHt03 +# a8YS2AvwOMKZBrDIOdUBFDFC04kNeWSHfpRgJGyvnkmc6Whe0t+bU7IKLMOv2akr +# rnoJr9eWWcpgGgXpZnboMlImEi/nqwhQz7NEt13YxC4Ddato88tt8zpcoRb0Rrrg +# OGSsbmQ1eKagYw8t00CT+OPeBw3VXHmlSSnnDb6gE3e+lD3v++MrWhAfTVYoonpy +# 4BI6t0le2O3tQ5GD2Xuye4Yb2T6xjF3oiU+EGvKhL1nkkDstrjNYxbc+/jLTswM9 +# sbKvkjh+0p2ALPVOVpEhNSXDOW5kf1O6nA+tGSOEy/S6A4aN91/w0FK/jJSHvMAh +# dCVfGCi2zCcoOCWYOUo2z3yxkq4cI6epZuxhH2rhKEmdX4jiJV3TIUs+UsS1Vz8k +# A/DRelsv1SPjcF0PUUZ3s/gA4bysAoJf28AVs70b1FVL5zmhD+kjSbwYuER8ReTB +# w3J64HLnJN+/RpnF78IcV9uDjexNSTCnq47f7Fufr/zdsGbiwZeBe+3W7UvnSSmn +# Eyimp31ngOaKYnhfsi+E11ecXL93KCjx7W3DKI8sj0A3T8HhhUSJxAlMxdSlQy90 +# lfdu+HggWCwTXWCVmj5PM4TasIgX3p5O9JawvEagbJjS4NaIjAsCAwEAAaOCAe0w +# ggHpMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBRIbmTlUAXTgqoXNzcitW2o +# ynUClTAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMCAYYwDwYD +# VR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBRyLToCMZBDuRQFTuHqp8cx0SOJNDBa +# BgNVHR8EUzBRME+gTaBLhklodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20vcGtpL2Ny +# bC9wcm9kdWN0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3JsMF4GCCsG +# AQUFBwEBBFIwUDBOBggrBgEFBQcwAoZCaHR0cDovL3d3dy5taWNyb3NvZnQuY29t +# L3BraS9jZXJ0cy9NaWNSb29DZXJBdXQyMDExXzIwMTFfMDNfMjIuY3J0MIGfBgNV +# HSAEgZcwgZQwgZEGCSsGAQQBgjcuAzCBgzA/BggrBgEFBQcCARYzaHR0cDovL3d3 +# dy5taWNyb3NvZnQuY29tL3BraW9wcy9kb2NzL3ByaW1hcnljcHMuaHRtMEAGCCsG +# AQUFBwICMDQeMiAdAEwAZQBnAGEAbABfAHAAbwBsAGkAYwB5AF8AcwB0AGEAdABl +# AG0AZQBuAHQALiAdMA0GCSqGSIb3DQEBCwUAA4ICAQBn8oalmOBUeRou09h0ZyKb +# C5YR4WOSmUKWfdJ5DJDBZV8uLD74w3LRbYP+vj/oCso7v0epo/Np22O/IjWll11l +# hJB9i0ZQVdgMknzSGksc8zxCi1LQsP1r4z4HLimb5j0bpdS1HXeUOeLpZMlEPXh6 +# I/MTfaaQdION9MsmAkYqwooQu6SpBQyb7Wj6aC6VoCo/KmtYSWMfCWluWpiW5IP0 +# wI/zRive/DvQvTXvbiWu5a8n7dDd8w6vmSiXmE0OPQvyCInWH8MyGOLwxS3OW560 +# STkKxgrCxq2u5bLZ2xWIUUVYODJxJxp/sfQn+N4sOiBpmLJZiWhub6e3dMNABQam +# ASooPoI/E01mC8CzTfXhj38cbxV9Rad25UAqZaPDXVJihsMdYzaXht/a8/jyFqGa +# J+HNpZfQ7l1jQeNbB5yHPgZ3BtEGsXUfFL5hYbXw3MYbBL7fQccOKO7eZS/sl/ah +# XJbYANahRr1Z85elCUtIEJmAH9AAKcWxm6U/RXceNcbSoqKfenoi+kiVH6v7RyOA +# 9Z74v2u3S5fi63V4GuzqN5l5GEv/1rMjaHXmr/r8i+sLgOppO6/8MO0ETI7f33Vt +# Y5E90Z1WTk+/gFcioXgRMiF670EKsT/7qMykXcGhiJtXcVZOSEXAQsmbdlsKgEhr +# /Xmfwb1tbWrJUnMTDXpQzTGCGgowghoGAgEBMIGVMH4xCzAJBgNVBAYTAlVTMRMw +# EQYDVQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN +# aWNyb3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNp +# Z25pbmcgUENBIDIwMTECEzMAAANOtTx6wYRv6ysAAAAAA04wDQYJYIZIAWUDBAIB +# BQCgga4wGQYJKoZIhvcNAQkDMQwGCisGAQQBgjcCAQQwHAYKKwYBBAGCNwIBCzEO +# MAwGCisGAQQBgjcCARUwLwYJKoZIhvcNAQkEMSIEIMHofDlPBqmVqK1okjwWVgBB +# tT7fuKbvz/K2Z2tehrjfMEIGCisGAQQBgjcCAQwxNDAyoBSAEgBNAGkAYwByAG8A +# cwBvAGYAdKEagBhodHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20wDQYJKoZIhvcNAQEB +# BQAEggEAh6WOd8mYDPLLkfaNOj1I07laB0TnfUoY3kPU8nRKXndoULPuXHTw+0TR +# ZwgvCjxyErXrV6Gpd03Xy2YcKFMOT5DHY8iV0olxkvZNHTt0oMmIUjYyCkblV3PA +# nrDZGbmmxw3FKRT/n2bQ9SNj7PNl29HgNxQxlDSEl6yJP+Bs11pyfW5uNYNVFPIj +# M5ddEr31Z9y/SwJ0oB892Anu6ZT2Cqy6Xt5XIacqNVpWG00UUVguvrHdelkLF4g4 +# dgI+UROhJfNfXgkmazGilBrufCC3LFe46BZgY3kJavyni3F3qsAujcb8+0QXczTu +# 9omGeP+6mHTHBR+9gPJW9pp+0x6O96GCF5QwgheQBgorBgEEAYI3AwMBMYIXgDCC +# F3wGCSqGSIb3DQEHAqCCF20wghdpAgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFSBgsq +# hkiG9w0BCRABBKCCAUEEggE9MIIBOQIBAQYKKwYBBAGEWQoDATAxMA0GCWCGSAFl +# AwQCAQUABCDB/5pgJMSywQWzPV9JmKhJL6MoNIaXQMIgMZkbopcpUAIGZQQDsMbk +# GBMyMDIzMDkyMDA1NTA0NC4xNTJaMASAAgH0oIHRpIHOMIHLMQswCQYDVQQGEwJV +# UzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UE +# ChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1l +# cmljYSBPcGVyYXRpb25zMScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046REMwMC0w +# NUUwLUQ5NDcxJTAjBgNVBAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2Wg +# ghHqMIIHIDCCBQigAwIBAgITMwAAAdIhJDFKWL8tEQABAAAB0jANBgkqhkiG9w0B +# AQsFADB8MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE +# BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYD +# VQQDEx1NaWNyb3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMDAeFw0yMzA1MjUxOTEy +# MjFaFw0yNDAyMDExOTEyMjFaMIHLMQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2Fz +# aGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENv +# cnBvcmF0aW9uMSUwIwYDVQQLExxNaWNyb3NvZnQgQW1lcmljYSBPcGVyYXRpb25z +# MScwJQYDVQQLEx5uU2hpZWxkIFRTUyBFU046REMwMC0wNUUwLUQ5NDcxJTAjBgNV +# BAMTHE1pY3Jvc29mdCBUaW1lLVN0YW1wIFNlcnZpY2UwggIiMA0GCSqGSIb3DQEB +# AQUAA4ICDwAwggIKAoICAQDcYIhC0QI/SPaT5+nYSBsSdhBPO2SXM40Vyyg8Fq1T +# PrMNDzxChxWUD7fbKwYGSsONgtjjVed5HSh5il75jNacb6TrZwuX+Q2++f2/8CCy +# u8TY0rxEInD3Tj52bWz5QRWVQejfdCA/n6ZzinhcZZ7+VelWgTfYC7rDrhX3TBX8 +# 9elqXmISOVIWeXiRK8h9hH6SXgjhQGGQbf2bSM7uGkKzJ/pZ2LvlTzq+mOW9iP2j +# cYEA4bpPeurpglLVUSnGGQLmjQp7Sdy1wE52WjPKdLnBF6JbmSREM/Dj9Z7okxRN +# UjYSdgyvZ1LWSilhV/wegYXVQ6P9MKjRnE8CI5KMHmq7EsHhIBK0B99dFQydL1vd +# uC7eWEjzz55Z/DyH6Hl2SPOf5KZ4lHf6MUwtgaf+MeZxkW0ixh/vL1mX8VsJTHa8 +# AH+0l/9dnWzFMFFJFG7g95nHJ6MmYPrfmoeKORoyEQRsSus2qCrpMjg/P3Z9WJAt +# FGoXYMD19NrzG4UFPpVbl3N1XvG4/uldo1+anBpDYhxQU7k1gfHn6QxdUU0TsrJ/ +# JCvLffS89b4VXlIaxnVF6QZh+J7xLUNGtEmj6dwPzoCfL7zqDZJvmsvYNk1lcbyV +# xMIgDFPoA2fZPXHF7dxahM2ZG7AAt3vZEiMtC6E/ciLRcIwzlJrBiHEenIPvxW15 +# qwIDAQABo4IBSTCCAUUwHQYDVR0OBBYEFCC2n7cnR3ToP/kbEZ2XJFFmZ1kkMB8G +# A1UdIwQYMBaAFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMF8GA1UdHwRYMFYwVKBSoFCG +# Tmh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY3JsL01pY3Jvc29mdCUy +# MFRpbWUtU3RhbXAlMjBQQ0ElMjAyMDEwKDEpLmNybDBsBggrBgEFBQcBAQRgMF4w +# XAYIKwYBBQUHMAKGUGh0dHA6Ly93d3cubWljcm9zb2Z0LmNvbS9wa2lvcHMvY2Vy +# dHMvTWljcm9zb2Z0JTIwVGltZS1TdGFtcCUyMFBDQSUyMDIwMTAoMSkuY3J0MAwG +# A1UdEwEB/wQCMAAwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwgwDgYDVR0PAQH/BAQD +# AgeAMA0GCSqGSIb3DQEBCwUAA4ICAQCw5iq0Ey0LlAdz2PcqchRwW5d+fitNISCv +# qD0E6W/AyiTk+TM3WhYTaxQ2pP6Or4qOV+Du7/L+k18gYr1phshxVMVnXNcdjecM +# tTWUOVAwbJoeWHaAgknNIMzXK3+zguG5TVcLEh/CVMy1J7KPE8Q0Cz56NgWzd9ur +# G+shSDKkKdhOYPXF970Mr1GCFFpe1oXjEy6aS+Heavp2wmy65mbu0AcUOPEn+hYq +# ijgLXSPqvuFmOOo5UnSV66Dv5FdkqK7q5DReox9RPEZcHUa+2BUKPjp+dQ3D4c9I +# H8727KjMD8OXZomD9A8Mr/fcDn5FI7lfZc8ghYc7spYKTO/0Z9YRRamhVWxxrIsB +# N5LrWh+18soXJ++EeSjzSYdgGWYPg16hL/7Aydx4Kz/WBTUmbGiiVUcE/I0aQU2U +# /0NzUiIFIW80SvxeDWn6I+hyVg/sdFSALP5JT7wAe8zTvsrI2hMpEVLdStFAMqan +# FYqtwZU5FoAsoPZ7h1ElWmKLZkXk8ePuALztNY1yseO0TwdueIGcIwItrlBYg1Xp +# Pz1+pMhGMVble6KHunaKo5K/ldOM0mQQT4Vjg6ZbzRIVRoDcArQ5//0875jOUvJt +# Yyc7Hl04jcmvjEIXC3HjkUYvgHEWL0QF/4f7vLAchaEZ839/3GYOdqH5VVnZrUIB +# QB6DTaUILDCCB3EwggVZoAMCAQICEzMAAAAVxedrngKbSZkAAAAAABUwDQYJKoZI +# hvcNAQELBQAwgYgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw +# DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3NvZnQgQ29ycG9yYXRpb24x +# MjAwBgNVBAMTKU1pY3Jvc29mdCBSb290IENlcnRpZmljYXRlIEF1dGhvcml0eSAy +# MDEwMB4XDTIxMDkzMDE4MjIyNVoXDTMwMDkzMDE4MzIyNVowfDELMAkGA1UEBhMC +# VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNV +# BAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRp +# bWUtU3RhbXAgUENBIDIwMTAwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoIC +# AQDk4aZM57RyIQt5osvXJHm9DtWC0/3unAcH0qlsTnXIyjVX9gF/bErg4r25Phdg +# M/9cT8dm95VTcVrifkpa/rg2Z4VGIwy1jRPPdzLAEBjoYH1qUoNEt6aORmsHFPPF +# dvWGUNzBRMhxXFExN6AKOG6N7dcP2CZTfDlhAnrEqv1yaa8dq6z2Nr41JmTamDu6 +# GnszrYBbfowQHJ1S/rboYiXcag/PXfT+jlPP1uyFVk3v3byNpOORj7I5LFGc6XBp +# Dco2LXCOMcg1KL3jtIckw+DJj361VI/c+gVVmG1oO5pGve2krnopN6zL64NF50Zu +# yjLVwIYwXE8s4mKyzbnijYjklqwBSru+cakXW2dg3viSkR4dPf0gz3N9QZpGdc3E +# XzTdEonW/aUgfX782Z5F37ZyL9t9X4C626p+Nuw2TPYrbqgSUei/BQOj0XOmTTd0 +# lBw0gg/wEPK3Rxjtp+iZfD9M269ewvPV2HM9Q07BMzlMjgK8QmguEOqEUUbi0b1q +# GFphAXPKZ6Je1yh2AuIzGHLXpyDwwvoSCtdjbwzJNmSLW6CmgyFdXzB0kZSU2LlQ +# +QuJYfM2BjUYhEfb3BvR/bLUHMVr9lxSUV0S2yW6r1AFemzFER1y7435UsSFF5PA +# PBXbGjfHCBUYP3irRbb1Hode2o+eFnJpxq57t7c+auIurQIDAQABo4IB3TCCAdkw +# EgYJKwYBBAGCNxUBBAUCAwEAATAjBgkrBgEEAYI3FQIEFgQUKqdS/mTEmr6CkTxG +# NSnPEP8vBO4wHQYDVR0OBBYEFJ+nFV0AXmJdg/Tl0mWnG1M1GelyMFwGA1UdIARV +# MFMwUQYMKwYBBAGCN0yDfQEBMEEwPwYIKwYBBQUHAgEWM2h0dHA6Ly93d3cubWlj +# cm9zb2Z0LmNvbS9wa2lvcHMvRG9jcy9SZXBvc2l0b3J5Lmh0bTATBgNVHSUEDDAK +# BggrBgEFBQcDCDAZBgkrBgEEAYI3FAIEDB4KAFMAdQBiAEMAQTALBgNVHQ8EBAMC +# AYYwDwYDVR0TAQH/BAUwAwEB/zAfBgNVHSMEGDAWgBTV9lbLj+iiXGJo0T2UkFvX +# zpoYxDBWBgNVHR8ETzBNMEugSaBHhkVodHRwOi8vY3JsLm1pY3Jvc29mdC5jb20v +# cGtpL2NybC9wcm9kdWN0cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcmwwWgYI +# KwYBBQUHAQEETjBMMEoGCCsGAQUFBzAChj5odHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20vcGtpL2NlcnRzL01pY1Jvb0NlckF1dF8yMDEwLTA2LTIzLmNydDANBgkqhkiG +# 9w0BAQsFAAOCAgEAnVV9/Cqt4SwfZwExJFvhnnJL/Klv6lwUtj5OR2R4sQaTlz0x +# M7U518JxNj/aZGx80HU5bbsPMeTCj/ts0aGUGCLu6WZnOlNN3Zi6th542DYunKmC +# VgADsAW+iehp4LoJ7nvfam++Kctu2D9IdQHZGN5tggz1bSNU5HhTdSRXud2f8449 +# xvNo32X2pFaq95W2KFUn0CS9QKC/GbYSEhFdPSfgQJY4rPf5KYnDvBewVIVCs/wM +# nosZiefwC2qBwoEZQhlSdYo2wh3DYXMuLGt7bj8sCXgU6ZGyqVvfSaN0DLzskYDS +# PeZKPmY7T7uG+jIa2Zb0j/aRAfbOxnT99kxybxCrdTDFNLB62FD+CljdQDzHVG2d +# Y3RILLFORy3BFARxv2T5JL5zbcqOCb2zAVdJVGTZc9d/HltEAY5aGZFrDZ+kKNxn +# GSgkujhLmm77IVRrakURR6nxt67I6IleT53S0Ex2tVdUCbFpAUR+fKFhbHP+Crvs +# QWY9af3LwUFJfn6Tvsv4O+S3Fb+0zj6lMVGEvL8CwYKiexcdFYmNcP7ntdAoGokL +# jzbaukz5m/8K6TT4JDVnK+ANuOaMmdbhIurwJ0I9JZTmdHRbatGePu1+oDEzfbzL +# 6Xu/OHBE0ZDxyKs6ijoIYn/ZcGNTTY3ugm2lBRDBcQZqELQdVTNYs6FwZvKhggNN +# MIICNQIBATCB+aGB0aSBzjCByzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hp +# bmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw +# b3JhdGlvbjElMCMGA1UECxMcTWljcm9zb2Z0IEFtZXJpY2EgT3BlcmF0aW9uczEn +# MCUGA1UECxMeblNoaWVsZCBUU1MgRVNOOkRDMDAtMDVFMC1EOTQ3MSUwIwYDVQQD +# ExxNaWNyb3NvZnQgVGltZS1TdGFtcCBTZXJ2aWNloiMKAQEwBwYFKw4DAhoDFQCJ +# ptLCZsE06NtmHQzB5F1TroFSBqCBgzCBgKR+MHwxCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29mdCBUaW1lLVN0YW1w +# IFBDQSAyMDEwMA0GCSqGSIb3DQEBCwUAAgUA6LRwyDAiGA8yMDIzMDkxOTE5MTEw +# NFoYDzIwMjMwOTIwMTkxMTA0WjB0MDoGCisGAQQBhFkKBAExLDAqMAoCBQDotHDI +# AgEAMAcCAQACAi5fMAcCAQACAhMzMAoCBQDotcJIAgEAMDYGCisGAQQBhFkKBAIx +# KDAmMAwGCisGAQQBhFkKAwKgCjAIAgEAAgMHoSChCjAIAgEAAgMBhqAwDQYJKoZI +# hvcNAQELBQADggEBABSMhArCfMaUns9Ybi+bd7CrSqySoFW9FQHNYSc/7Z4kVIDH +# MOSWB04XzoJV+b5q9p40kFfOlc5b184s/ZuR0zXF8NOTag0yTpWUYZDo3OrdVa45 +# g1JiqIjXs1Mpilyf/r194uoB8G63Kyxv4tyQX01/UL1ohtT88bXEDl6pNb+Xyhu/ +# 3benlypP9gr5fXHU1AcSpR/fuLO2QX4Inqqsrn8073fZkUrFfXeHgYGscjH/6A8V +# xK3x86MVX85OKS7L48K64XMJmuNzDOPMz7fbFLtwrj3tXhnU179w/GuGdvFgRaPf +# VfxZcx4y31FR1J4hDsrSVj/eGul6ZvDhEP5llugxggQNMIIECQIBATCBkzB8MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMSYwJAYDVQQDEx1NaWNy +# b3NvZnQgVGltZS1TdGFtcCBQQ0EgMjAxMAITMwAAAdIhJDFKWL8tEQABAAAB0jAN +# BglghkgBZQMEAgEFAKCCAUowGgYJKoZIhvcNAQkDMQ0GCyqGSIb3DQEJEAEEMC8G +# CSqGSIb3DQEJBDEiBCDABiZtIILyalxFaNkpSNLPyB6dnqa8Og8PeO2M5QwQvjCB +# +gYLKoZIhvcNAQkQAi8xgeowgecwgeQwgb0EIMeAIJPf30i9ZbOExU557GwWNaLH +# 0Z5s65JFga2DeaROMIGYMIGApH4wfDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldh +# c2hpbmd0b24xEDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBD +# b3Jwb3JhdGlvbjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAgUENBIDIw +# MTACEzMAAAHSISQxSli/LREAAQAAAdIwIgQgxHcZpEl6iRNRIzFH1U59AFtiyMD5 +# cXN76GiPGy+kKMAwDQYJKoZIhvcNAQELBQAEggIA0Ev33yJgxJMIh75Ft6iuoxJH +# qmm0N6lliYKEIWF42TZBKU4ubpdr1tca9Wt8bL/AagZ4tEEb1fKBJTwmedSQQOey +# cWdkjeXRlHqBkHEpz/u+yIl9/4KojgmxT9P0ZNfHPjQxt9Zb7wubc2N9tgJ6ZwXr +# Kx/1DZkiKwXXRbNga7yyVM924J0/xokBiDkWtWKF4UOdEAtAoQmxwtVFWnJBVVQK +# BV8bAgi4+5lGrD1PoX1/uLd1hsnr0+/qu/Lz8f20DcFmPrp+gEXLdDCvws93b9fx +# 3hSuuVawfT8XFnXEut989RtYBlYkOPgDIrUbuHj5EqmB19UnhOeFkvhMHEqq+XKo +# kO9mHo8WZOnMFYM8FeSclxl3z/3jrAEibfoXBpVXFv1F3GGt5WH+2UWs7JXTK01R +# tnDr6DRsMEIr0yw2g1cb//u0BkmcEwBXr51dNX3E0WAxqVJk9yjV+YuGLjeD569E +# wDGANqkm83LIALMCBaBAzjVoG8jVnR0gLXrca7i+ez1h/jVDl5GmGcVfdgvxzDYk +# +uMpr/FsnoEFMGiBe/9l72gXY7pnoCipoNTx6q3GA3cfzfVDw27c8AzCny1DHUvj +# cUPCdId96d7eIR//lZo+DnJdQ+rsPlDuqpPdoldS/TzlCl+5Z8idTtxp9kSqzt8O +# aZYYi6hivyQoGN3avBU= +# SIG # End signature block diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/[Content_Types].xml b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/[Content_Types].xml new file mode 100644 index 000000000000..247435745a35 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/[Content_Types].xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/_rels/.rels b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/_rels/.rels new file mode 100644 index 000000000000..756a7cb14f58 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/_rels/.rels @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/en-US/about_az.help.txt b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/en-US/about_az.help.txt new file mode 100644 index 000000000000..fb4a5e9becd1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/en-US/about_az.help.txt @@ -0,0 +1,50 @@ +About topic for Azure PowerShell - about_az + +TOPIC + +about_Az + +SHORT DESCRIPTION + +The Azure Az PowerShell module is a set of cmdlets for managing Azure +resources directly from the PowerShell command line and in PowerShell +scripts. + +LONG DESCRIPTION + +Azure PowerShell provides cross-platform cmdlets for managing Azure +services. All Azure PowerShell cmdlets work on Windows PowerShell 5.1 and +supported versions of PowerShell 7. + +The Azure PowerShell cmdlets follow the naming convention {verb}-Az{noun}. + +- {verb} is an approved PowerShell verb reflecting the corresponding HTTP + operation. + +- {noun} matches or has a close equivalent to the name of the resource. + +The cmdlets produce .NET objects that can be piped between commands +simplifying the sequencing of commands making Azure PowerShell a powerful +solution for scripting and automation purposes. + +A PowerShell module is available for each Azure service. For convenience, +we provide a wrapper module named "Az" that comprises the stable modules. +Modules in preview must be installed independently or via the "AzPreview" +wrapper module. + +Azure PowerShell is frequently updated to include bug fixes and service +updates. It is recommended to plan to update to the most recent version +regularly (a minimum of twice a year). + +GETTING STARTED + +1. Connect to Azure using Connect-AzAccount + +2. Run your first command. For example, create a resource group in the + east US region. + + New-AzResourceGroup -Name "MyResoureGroup" -location "eastus" + +SEE ALSO + +Azure PowerShell documentation: https://learn.microsoft.com/powershell/azure diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Azure.Core.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Azure.Core.dll new file mode 100644 index 000000000000..66f3d3165b86 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Azure.Core.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Microsoft.Identity.Client.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Microsoft.Identity.Client.dll new file mode 100644 index 000000000000..7e98f30fc54a Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp2.1/Microsoft.Identity.Client.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp3.1/Microsoft.Identity.Client.Extensions.Msal.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp3.1/Microsoft.Identity.Client.Extensions.Msal.dll new file mode 100644 index 000000000000..02168e3b1856 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netcoreapp3.1/Microsoft.Identity.Client.Extensions.Msal.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Azure.Core.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Azure.Core.dll new file mode 100644 index 000000000000..2593da6045ce Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Azure.Core.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.Extensions.Msal.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.Extensions.Msal.dll new file mode 100644 index 000000000000..87f0bdfe02f2 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.Extensions.Msal.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.dll new file mode 100644 index 000000000000..2a1b17bc86a4 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Microsoft.Identity.Client.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Newtonsoft.Json.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Newtonsoft.Json.dll new file mode 100644 index 000000000000..9f13f1f8a4fd Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/Newtonsoft.Json.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Diagnostics.DiagnosticSource.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Diagnostics.DiagnosticSource.dll new file mode 100644 index 000000000000..92419a27e0c2 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Diagnostics.DiagnosticSource.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Numerics.Vectors.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Numerics.Vectors.dll new file mode 100644 index 000000000000..08659724d4f8 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Numerics.Vectors.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Reflection.DispatchProxy.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Reflection.DispatchProxy.dll new file mode 100644 index 000000000000..674ced0460de Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Reflection.DispatchProxy.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Runtime.CompilerServices.Unsafe.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Runtime.CompilerServices.Unsafe.dll new file mode 100644 index 000000000000..c5ba4e4047a1 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Runtime.CompilerServices.Unsafe.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Security.Cryptography.Cng.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Security.Cryptography.Cng.dll new file mode 100644 index 000000000000..4f4c30e080bd Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Security.Cryptography.Cng.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Text.Encodings.Web.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Text.Encodings.Web.dll new file mode 100644 index 000000000000..6d2b207854ac Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Text.Encodings.Web.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Xml.ReaderWriter.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Xml.ReaderWriter.dll new file mode 100644 index 000000000000..022e63a21a86 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netfx/System.Xml.ReaderWriter.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.BrokeredAuthentication.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.BrokeredAuthentication.dll new file mode 100644 index 000000000000..4b4b2f2b663d Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.BrokeredAuthentication.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.dll new file mode 100644 index 000000000000..5662a76ad958 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Azure.Identity.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Bcl.AsyncInterfaces.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Bcl.AsyncInterfaces.dll new file mode 100644 index 000000000000..f2955edfecb7 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Bcl.AsyncInterfaces.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.Broker.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.Broker.dll new file mode 100644 index 000000000000..3e0a147d4bcb Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.Broker.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.NativeInterop.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.NativeInterop.dll new file mode 100644 index 000000000000..a7d555909366 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.Identity.Client.NativeInterop.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.dll new file mode 100644 index 000000000000..f793fd89bece Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/Microsoft.IdentityModel.Abstractions.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Buffers.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Buffers.dll new file mode 100644 index 000000000000..c517a3b62cc7 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Buffers.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Memory.Data.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Memory.Data.dll new file mode 100644 index 000000000000..6f2a3e0ad07f Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Memory.Data.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Memory.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Memory.dll new file mode 100644 index 000000000000..bdfc501e9647 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Memory.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Net.Http.WinHttpHandler.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Net.Http.WinHttpHandler.dll new file mode 100644 index 000000000000..8bd471e74c6e Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Net.Http.WinHttpHandler.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Private.ServiceModel.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Private.ServiceModel.dll new file mode 100644 index 000000000000..3f9f84edf0ed Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Private.ServiceModel.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.AccessControl.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.AccessControl.dll new file mode 100644 index 000000000000..36fb33af4590 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.AccessControl.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Permissions.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Permissions.dll new file mode 100644 index 000000000000..2a353ee22eec Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Permissions.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Principal.Windows.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Principal.Windows.dll new file mode 100644 index 000000000000..19d0fc0e971c Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Security.Principal.Windows.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.ServiceModel.Primitives.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.ServiceModel.Primitives.dll new file mode 100644 index 000000000000..c1aa0a64f8f9 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.ServiceModel.Primitives.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Text.Json.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Text.Json.dll new file mode 100644 index 000000000000..fe2154a3bf3a Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Text.Json.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Threading.Tasks.Extensions.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Threading.Tasks.Extensions.dll new file mode 100644 index 000000000000..dfab23478ab4 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/System.Threading.Tasks.Extensions.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime.dll new file mode 100644 index 000000000000..70162a8713a2 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_arm64.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_arm64.dll new file mode 100644 index 000000000000..aca4cb32691f Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_arm64.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_x86.dll b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_x86.dll new file mode 100644 index 000000000000..24735b8531b8 Binary files /dev/null and b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/lib/netstandard2.0/msalruntime_x86.dll differ diff --git a/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/package/services/metadata/core-properties/f9ac9c2e40914e78a646a7b0b997403b.psmdcp b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/package/services/metadata/core-properties/f9ac9c2e40914e78a646a7b0b997403b.psmdcp new file mode 100644 index 000000000000..d07e7bb54153 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/modules/Az.Accounts/2.13.1/package/services/metadata/core-properties/f9ac9c2e40914e78a646a7b0b997403b.psmdcp @@ -0,0 +1,11 @@ + + + Microsoft Corporation + Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. + +For more information on account credential management, please visit the following: https://learn.microsoft.com/powershell/azure/authenticate-azureps + Az.Accounts + 2.13.1 + Azure ResourceManager ARM Accounts Authentication Environment Subscription PSModule PSIncludes_Cmdlet PSCmdlet_Disable-AzDataCollection PSCmdlet_Disable-AzContextAutosave PSCmdlet_Enable-AzDataCollection PSCmdlet_Enable-AzContextAutosave PSCmdlet_Remove-AzEnvironment PSCmdlet_Get-AzEnvironment PSCmdlet_Set-AzEnvironment PSCmdlet_Add-AzEnvironment PSCmdlet_Get-AzSubscription PSCmdlet_Connect-AzAccount PSCmdlet_Get-AzContext PSCmdlet_Set-AzContext PSCmdlet_Import-AzContext PSCmdlet_Save-AzContext PSCmdlet_Get-AzTenant PSCmdlet_Send-Feedback PSCmdlet_Resolve-AzError PSCmdlet_Select-AzContext PSCmdlet_Rename-AzContext PSCmdlet_Remove-AzContext PSCmdlet_Clear-AzContext PSCmdlet_Disconnect-AzAccount PSCmdlet_Get-AzContextAutosaveSetting PSCmdlet_Set-AzDefault PSCmdlet_Get-AzDefault PSCmdlet_Clear-AzDefault PSCmdlet_Register-AzModule PSCmdlet_Enable-AzureRmAlias PSCmdlet_Disable-AzureRmAlias PSCmdlet_Uninstall-AzureRm PSCmdlet_Invoke-AzRestMethod PSCmdlet_Get-AzAccessToken PSCmdlet_Open-AzSurveyLink PSCmdlet_Get-AzConfig PSCmdlet_Update-AzConfig PSCmdlet_Clear-AzConfig PSCmdlet_Export-AzConfig PSCmdlet_Import-AzConfig PSCommand_Disable-AzDataCollection PSCommand_Disable-AzContextAutosave PSCommand_Enable-AzDataCollection PSCommand_Enable-AzContextAutosave PSCommand_Remove-AzEnvironment PSCommand_Get-AzEnvironment PSCommand_Set-AzEnvironment PSCommand_Add-AzEnvironment PSCommand_Get-AzSubscription PSCommand_Connect-AzAccount PSCommand_Get-AzContext PSCommand_Set-AzContext PSCommand_Import-AzContext PSCommand_Save-AzContext PSCommand_Get-AzTenant PSCommand_Send-Feedback PSCommand_Resolve-AzError PSCommand_Select-AzContext PSCommand_Rename-AzContext PSCommand_Remove-AzContext PSCommand_Clear-AzContext PSCommand_Disconnect-AzAccount PSCommand_Get-AzContextAutosaveSetting PSCommand_Set-AzDefault PSCommand_Get-AzDefault PSCommand_Clear-AzDefault PSCommand_Register-AzModule PSCommand_Enable-AzureRmAlias PSCommand_Disable-AzureRmAlias PSCommand_Uninstall-AzureRm PSCommand_Invoke-AzRestMethod PSCommand_Get-AzAccessToken PSCommand_Open-AzSurveyLink PSCommand_Get-AzConfig PSCommand_Update-AzConfig PSCommand_Clear-AzConfig PSCommand_Export-AzConfig PSCommand_Import-AzConfig PSCommand_Add-AzAccount PSCommand_Login-AzAccount PSCommand_Remove-AzAccount PSCommand_Logout-AzAccount PSCommand_Select-AzSubscription PSCommand_Resolve-Error PSCommand_Save-AzProfile PSCommand_Get-AzDomain PSCommand_Invoke-AzRest PSCommand_Set-AzConfig + NuGet, Version=6.6.1.2, Culture=neutral, PublicKeyToken=31bf3856ad364e35;Microsoft Windows NT 10.0.17763.0;.NET Framework 4.7.2 + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/AsyncCommandRuntime.cs b/swaggerci/oracle.DefaultTag/generated/runtime/AsyncCommandRuntime.cs new file mode 100644 index 000000000000..0fbea0dc6c1a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/AsyncCommandRuntime.cs @@ -0,0 +1,832 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + using System.Linq; + + internal interface IAsyncCommandRuntimeExtensions + { + Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep func); + System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs); + + T ExecuteSync(System.Func step); + } + + public class AsyncCommandRuntime : System.Management.Automation.ICommandRuntime2, IAsyncCommandRuntimeExtensions, System.IDisposable + { + private ICommandRuntime2 originalCommandRuntime; + private System.Threading.Thread originalThread; + public bool AllowInteractive { get; set; } = false; + + public CancellationToken cancellationToken; + SemaphoreSlim semaphore = new SemaphoreSlim(1, 1); + ManualResetEventSlim readyToRun = new ManualResetEventSlim(false); + ManualResetEventSlim completed = new ManualResetEventSlim(false); + + System.Action runOnMainThread; + + private System.Management.Automation.PSCmdlet cmdlet; + + internal AsyncCommandRuntime(System.Management.Automation.PSCmdlet cmdlet, CancellationToken cancellationToken) + { + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + this.cancellationToken = cancellationToken; + this.cmdlet = cmdlet; + if (cmdlet.PagingParameters != null) + { + WriteDebug("Client side pagination is enabled for this cmdlet"); + } + cmdlet.CommandRuntime = this; + } + + public PSHost Host => this.originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => this.originalCommandRuntime.CurrentPSTransaction; + + private void CheckForInteractive() + { + // This is an interactive call -- if we are not on the original thread, this will only work if this was done at ACR creation time; + if (!AllowInteractive) + { + throw new System.Exception("AsyncCommandRuntime is not configured for interactive calls"); + } + } + private void WaitOurTurn() + { + // wait for our turn to play + semaphore?.Wait(cancellationToken); + + // ensure that completed is not set + completed.Reset(); + } + + private void WaitForCompletion() + { + // wait for the result (or cancellation!) + WaitHandle.WaitAny(new[] { cancellationToken.WaitHandle, completed?.WaitHandle }); + + // let go of the semaphore + semaphore?.Release(); + + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, hasSecurityImpact, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldContinue(query, caption, ref yesToAll, ref noToAll); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool yta = yesToAll; + bool nta = noToAll; + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldContinue(query, caption, ref yta, ref nta); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + yesToAll = yta; + noToAll = nta; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string target, string action) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(target, action); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(target, action); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out shouldProcessReason); + } + + CheckForInteractive(); + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + ShouldProcessReason reason = ShouldProcessReason.None; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.ShouldProcess(verboseDescription, verboseWarning, caption, out reason); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + shouldProcessReason = reason; + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.ThrowTerminatingError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.ThrowTerminatingError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public bool TransactionAvailable() + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return originalCommandRuntime.TransactionAvailable(); + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + bool result = false; + + // set the function to run + runOnMainThread = () => result = originalCommandRuntime.TransactionAvailable(); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // set the output variables + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteCommandDetail(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteCommandDetail(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteCommandDetail(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteDebug(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteDebug(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteDebug(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteError(ErrorRecord errorRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteError(errorRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteError(errorRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteInformation(informationRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteInformation(informationRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteObject(sendToPipeline, enumerateCollection); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteProgress(sourceId, progressRecord); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteProgress(sourceId, progressRecord); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteVerbose(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteVerbose(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteVerbose(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void WriteWarning(string text) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + originalCommandRuntime.WriteWarning(text); + return; + } + + // otherwise, queue up the request and wait for the main thread to do the right thing. + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + + // set the function to run + runOnMainThread = () => originalCommandRuntime.WriteWarning(text); + + // tell the main thread to go ahead + readyToRun.Set(); + + // wait for the result (or cancellation!) + WaitForCompletion(); + + // return + return; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Wait(System.Threading.Tasks.Task ProcessRecordAsyncTask, System.Threading.CancellationToken cancellationToken) + { + do + { + WaitHandle.WaitAny(new[] { readyToRun.WaitHandle, ((System.IAsyncResult)ProcessRecordAsyncTask).AsyncWaitHandle }); + if (readyToRun.IsSet) + { + // reset the request for the next time + readyToRun.Reset(); + + // run the delegate on this thread + runOnMainThread(); + + // tell the originator everything is complete + completed.Set(); + } + } + while (!ProcessRecordAsyncTask.IsCompleted); + if (ProcessRecordAsyncTask.IsFaulted) + { + // don't unwrap a Aggregate Exception -- we'll lose the stack trace of the actual exception. + // if( ProcessRecordAsyncTask.Exception is System.AggregateException aggregate ) { + // throw aggregate.InnerException; + // } + throw ProcessRecordAsyncTask.Exception; + } + } + public Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep Wrap(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep func) => func.Target.GetType().Name != "Closure" ? func : (p1, p2, p3) => ExecuteSync>(() => func(p1, p2, p3)); + public System.Collections.Generic.IEnumerable Wrap(System.Collections.Generic.IEnumerable funcs) => funcs?.Select(Wrap); + + public T ExecuteSync(System.Func step) + { + // if we are on the original thread, just call straight thru. + if (this.originalThread == System.Threading.Thread.CurrentThread) + { + return step(); + } + + T result = default(T); + try + { + // wait for our turn to talk to the main thread + WaitOurTurn(); + // set the function to run + runOnMainThread = () => { result = step(); }; + // tell the main thread to go ahead + readyToRun.Set(); + // wait for the result (or cancellation!) + WaitForCompletion(); + // return + return result; + } + catch (System.OperationCanceledException exception) + { + // maybe don't even worry? + throw exception; + } + } + + public void Dispose() + { + if (cmdlet != null) + { + cmdlet.CommandRuntime = this.originalCommandRuntime; + cmdlet = null; + } + + semaphore?.Dispose(); + semaphore = null; + readyToRun?.Dispose(); + readyToRun = null; + completed?.Dispose(); + completed = null; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/AsyncJob.cs b/swaggerci/oracle.DefaultTag/generated/runtime/AsyncJob.cs new file mode 100644 index 000000000000..5d911ae886a2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/AsyncJob.cs @@ -0,0 +1,270 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + using System.Management.Automation; + using System.Management.Automation.Host; + using System.Threading; + + using System.Threading.Tasks; + + public class LongRunningJobCancelledException : System.Exception + { + public LongRunningJobCancelledException(string message) : base(message) + { + + } + } + + public class AsyncJob : Job, System.Management.Automation.ICommandRuntime2 + { + const int MaxRecords = 1000; + + private string _statusMessage = string.Empty; + + public override string StatusMessage => _statusMessage; + + public override bool HasMoreData => Output.Count > 0 || Progress.Count > 0 || Error.Count > 0 || Warning.Count > 0 || Verbose.Count > 0 || Debug.Count > 0; + + public override string Location => "localhost"; + + public PSHost Host => originalCommandRuntime.Host; + + public PSTransactionContext CurrentPSTransaction => originalCommandRuntime.CurrentPSTransaction; + + public override void StopJob() + { + Cancel(); + } + + private readonly PSCmdlet cmdlet; + private readonly ICommandRuntime2 originalCommandRuntime; + private readonly System.Threading.Thread originalThread; + + private void CheckForInteractive() + { + // This is an interactive call -- We should never allow interactivity in AsnycJob cmdlets. + throw new System.Exception("Cmdlets in AsyncJob; interactive calls are not permitted."); + } + private bool IsJobDone => CancellationToken.IsCancellationRequested || this.JobStateInfo.State == JobState.Failed || this.JobStateInfo.State == JobState.Stopped || this.JobStateInfo.State == JobState.Stopping || this.JobStateInfo.State == JobState.Completed; + + private readonly System.Action Cancel; + private readonly CancellationToken CancellationToken; + + internal AsyncJob(PSCmdlet cmdlet, string line, string name, CancellationToken cancellationToken, System.Action cancelMethod) : base(line, name) + { + SetJobState(JobState.NotStarted); + // know how to cancel/check for cancelation + this.CancellationToken = cancellationToken; + this.Cancel = cancelMethod; + + // we might need these. + this.originalCommandRuntime = cmdlet.CommandRuntime as ICommandRuntime2; + this.originalThread = System.Threading.Thread.CurrentThread; + + // the instance of the cmdlet we're going to run + this.cmdlet = cmdlet; + + // set the command runtime to the AsyncJob + cmdlet.CommandRuntime = this; + } + + /// + /// Monitors the task (which should be ProcessRecordAsync) to control + /// the lifetime of the job itself + /// + /// + public void Monitor(Task task) + { + SetJobState(JobState.Running); + task.ContinueWith(antecedent => + { + if (antecedent.IsCanceled) + { + // if the task was canceled, we're just going to call it completed. + SetJobState(JobState.Completed); + } + else if (antecedent.IsFaulted) + { + foreach (var innerException in antecedent.Exception.Flatten().InnerExceptions) + { + WriteError(new System.Management.Automation.ErrorRecord(innerException, string.Empty, System.Management.Automation.ErrorCategory.NotSpecified, null)); + } + + // a fault indicates an actual failure + SetJobState(JobState.Failed); + } + else + { + // otherwiser it's a completed state. + SetJobState(JobState.Completed); + } + }, CancellationToken); + } + + private void CheckForCancellation() + { + if (IsJobDone) + { + throw new LongRunningJobCancelledException("Long running job is canceled or stopping, continuation of the cmdlet is not permitted."); + } + } + + public void WriteInformation(InformationRecord informationRecord) + { + CheckForCancellation(); + + this.Information.Add(informationRecord); + } + + public bool ShouldContinue(string query, string caption, bool hasSecurityImpact, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public void WriteDebug(string text) + { + _statusMessage = text; + CheckForCancellation(); + + if (Debug.IsOpen && Debug.Count < MaxRecords) + { + Debug.Add(new DebugRecord(text)); + } + } + + public void WriteError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + + public void WriteObject(object sendToPipeline) + { + CheckForCancellation(); + + if (Output.IsOpen) + { + Output.Add(new PSObject(sendToPipeline)); + } + } + + public void WriteObject(object sendToPipeline, bool enumerateCollection) + { + CheckForCancellation(); + + if (enumerateCollection && sendToPipeline is System.Collections.IEnumerable enumerable) + { + foreach (var item in enumerable) + { + WriteObject(item); + } + } + else + { + WriteObject(sendToPipeline); + } + } + + public void WriteProgress(ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteProgress(long sourceId, ProgressRecord progressRecord) + { + CheckForCancellation(); + + if (Progress.IsOpen && Progress.Count < MaxRecords) + { + Progress.Add(progressRecord); + } + } + + public void WriteVerbose(string text) + { + CheckForCancellation(); + + if (Verbose.IsOpen && Verbose.Count < MaxRecords) + { + Verbose.Add(new VerboseRecord(text)); + } + } + + public void WriteWarning(string text) + { + CheckForCancellation(); + + if (Warning.IsOpen && Warning.Count < MaxRecords) + { + Warning.Add(new WarningRecord(text)); + } + } + + public void WriteCommandDetail(string text) + { + WriteVerbose(text); + } + + public bool ShouldProcess(string target) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string target, string action) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldProcess(string verboseDescription, string verboseWarning, string caption, out ShouldProcessReason shouldProcessReason) + { + CheckForInteractive(); + shouldProcessReason = ShouldProcessReason.None; + return false; + } + + public bool ShouldContinue(string query, string caption) + { + CheckForInteractive(); + return false; + } + + public bool ShouldContinue(string query, string caption, ref bool yesToAll, ref bool noToAll) + { + CheckForInteractive(); + return false; + } + + public bool TransactionAvailable() + { + // interactivity required? + return false; + } + + public void ThrowTerminatingError(ErrorRecord errorRecord) + { + if (Error.IsOpen) + { + Error.Add(errorRecord); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/AsyncOperationResponse.cs b/swaggerci/oracle.DefaultTag/generated/runtime/AsyncOperationResponse.cs new file mode 100644 index 000000000000..387cfc1dfb49 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/AsyncOperationResponse.cs @@ -0,0 +1,176 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + [System.ComponentModel.TypeConverter(typeof(AsyncOperationResponseTypeConverter))] + public class AsyncOperationResponse + { + private string _target; + public string Target { get => _target; set => _target = value; } + public AsyncOperationResponse() + { + } + internal AsyncOperationResponse(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json) + { + // pull target + { Target = If(json?.PropertyT("target"), out var _v) ? (string)_v : (string)Target; } + } + public string ToJsonString() + { + return $"{{ \"target\" : \"{this.Target}\" }}"; + } + + public static AsyncOperationResponse FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject json ? new AsyncOperationResponse(json) : null; + } + + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static AsyncOperationResponse FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(jsonText)); + + } + + public partial class AsyncOperationResponseTypeConverter : System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the + /// parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to a type + /// parameter. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the + /// parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static object ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(AsyncOperationResponse).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AsyncOperationResponse.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString()); ; + } + catch + { + // Unable to use JSON pattern + } + + if (typeof(System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as System.Management.Automation.PSObject).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return new AsyncOperationResponse { Target = (sourceValue as global::System.Collections.IDictionary).GetValueForProperty("target", "", global::System.Convert.ToString) }; + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs new file mode 100644 index 000000000000..90ed538d001c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportCmdletSurface.cs @@ -0,0 +1,113 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "CmdletSurface")] + [DoNotExport] + public class ExportCmdletSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CmdletFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool IncludeGeneralParameters { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetScriptCmdlets(this, CmdletFolder) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + foreach (var profileGroup in profileGroups) + { + var variantGroups = profileGroup.Variants + .GroupBy(v => new { v.CmdletName }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), String.Empty, profileGroup.ProfileName)); + var sb = UseExpandedFormat ? ExpandedFormat(variantGroups) : CondensedFormat(variantGroups); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, $"CmdletSurface-{profileGroup.ProfileName}.md"), sb.ToString()); + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private StringBuilder ExpandedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + foreach (var variantGroup in variantGroups.OrderBy(vg => vg.CmdletName)) + { + sb.Append($"### {variantGroup.CmdletName}{Environment.NewLine}"); + var parameterGroups = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private StringBuilder CondensedFormat(IEnumerable variantGroups) + { + var sb = new StringBuilder(); + var condensedGroups = variantGroups + .GroupBy(vg => vg.CmdletNoun) + .Select(vgg => ( + CmdletNoun: vgg.Key, + CmdletVerbs: vgg.Select(vg => vg.CmdletVerb).OrderBy(cv => cv).ToArray(), + ParameterGroups: vgg.SelectMany(vg => vg.ParameterGroups).DistinctBy(p => p.ParameterName).ToArray(), + OutputTypes: vgg.SelectMany(vg => vg.OutputTypes).Select(ot => ot.Type).DistinctBy(t => t.Name).Select(t => t.ToSyntaxTypeName()).ToArray())) + .OrderBy(vg => vg.CmdletNoun); + foreach (var condensedGroup in condensedGroups) + { + sb.Append($"### {condensedGroup.CmdletNoun} [{String.Join(", ", condensedGroup.CmdletVerbs)}] `{String.Join(", ", condensedGroup.OutputTypes)}`{Environment.NewLine}"); + var parameterGroups = condensedGroup.ParameterGroups + .Where(pg => !pg.DontShow && (IncludeGeneralParameters || (pg.OrderCategory != ParameterCategory.Azure && pg.OrderCategory != ParameterCategory.Runtime))); + foreach (var parameterGroup in parameterGroups) + { + sb.Append($" - {parameterGroup.ParameterName} `{parameterGroup.ParameterType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs new file mode 100644 index 000000000000..e17c6a8dd029 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportExampleStub.cs @@ -0,0 +1,74 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ExampleStub")] + [DoNotExport] + public class ExportExampleStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + + var exampleText = String.Join(String.Empty, DefaultExampleHelpInfos.Select(ehi => ehi.ToHelpExampleOutput())); + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var cmdletFilePaths = GetScriptCmdlets(exportDirectory).Select(fi => Path.Combine(outputFolder, $"{fi.Name}.md")).ToArray(); + var currentExamplesFilePaths = Directory.GetFiles(outputFolder).ToArray(); + // Remove examples of non-existing cmdlets + var removedCmdletFilePaths = currentExamplesFilePaths.Except(cmdletFilePaths); + foreach (var removedCmdletFilePath in removedCmdletFilePaths) + { + File.Delete(removedCmdletFilePath); + } + + // Only create example stubs if they don't exist + foreach (var cmdletFilePath in cmdletFilePaths.Except(currentExamplesFilePaths)) + { + File.WriteAllText(cmdletFilePath, exampleText); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs new file mode 100644 index 000000000000..0286fa43f0e1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportFormatPs1xml.cs @@ -0,0 +1,101 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "FormatPs1xml")] + [DoNotExport] + public class ExportFormatPs1xml : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string FilePath { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models"; + private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support"; + private const string PropertiesExcludedForTableview = @""; + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + + protected override void ProcessRecord() + { + try + { + var viewModels = GetFilteredViewParameters().Select(CreateViewModel).ToList(); + var ps1xml = new Configuration + { + ViewDefinitions = new ViewDefinitions + { + Views = viewModels + } + }; + File.WriteAllText(FilePath, ps1xml.ToXmlString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static IEnumerable GetFilteredViewParameters() + { + //https://stackoverflow.com/a/79738/294804 + //https://stackoverflow.com/a/949285/294804 + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass + && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace)) + && !t.GetCustomAttributes().Any()); + return types.Select(t => new ViewParameters(t, t.GetProperties() + .Select(p => new PropertyFormat(p)) + .Where(pf => !pf.Property.GetCustomAttributes().Any() + && (!PropertiesExcludedForTableview.Split(',').Contains(pf.Property.Name)) + && (pf.FormatTable != null || (pf.Origin != PropertyOrigin.Inlined && pf.Property.PropertyType.IsPsSimple()))) + .OrderByDescending(pf => pf.Index.HasValue) + .ThenBy(pf => pf.Index) + .ThenByDescending(pf => pf.Origin.HasValue) + .ThenBy(pf => pf.Origin))).Where(vp => vp.Properties.Any()); + } + + private static View CreateViewModel(ViewParameters viewParameters) + { + var entries = viewParameters.Properties.Select(pf => + (TableColumnHeader: new TableColumnHeader { Label = pf.Label, Width = pf.Width }, + TableColumnItem: new TableColumnItem { PropertyName = pf.Property.Name })).ToArray(); + + return new View + { + Name = viewParameters.Type.FullName, + ViewSelectedBy = new ViewSelectedBy + { + TypeName = viewParameters.Type.FullName + }, + TableControl = new TableControl + { + TableHeaders = new TableHeaders + { + TableColumnHeaders = entries.Select(e => e.TableColumnHeader).ToList() + }, + TableRowEntries = new TableRowEntries + { + TableRowEntry = new TableRowEntry + { + TableColumnItems = new TableColumnItems + { + TableItems = entries.Select(e => e.TableColumnItem).ToList() + } + } + } + } + }; + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs new file mode 100644 index 000000000000..6eb6aaca5178 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportHelpMarkdown.cs @@ -0,0 +1,56 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.MarkdownRenderer; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "HelpMarkdown")] + [DoNotExport] + public class ExportHelpMarkdown : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSModuleInfo ModuleInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] FunctionInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSObject[] HelpInfo { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter()] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var helpInfos = HelpInfo.Select(hi => hi.ToPsHelpInfo()); + var variantGroups = FunctionInfo.Select(fi => fi.BaseObject).Cast() + .Join(helpInfos, fi => fi.Name, phi => phi.CmdletName, (fi, phi) => fi.ToVariants(phi)) + .Select(va => new VariantGroup(ModuleInfo.Name, va.First().CmdletName, va, String.Empty)); + WriteMarkdowns(variantGroups, ModuleInfo.ToModuleInfo(), DocsFolder, ExamplesFolder, AddComplexInterfaceInfo.IsPresent); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs new file mode 100644 index 000000000000..062b4c703ff0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportModelSurface.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ModelSurface")] + [DoNotExport] + public class ExportModelSurface : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public bool UseExpandedFormat { get; set; } + + private const string ModelNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models"; + private const string SupportNamespace = @"Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Support"; + + protected override void ProcessRecord() + { + try + { + var types = Assembly.GetExecutingAssembly().GetExportedTypes() + .Where(t => t.IsClass && (t.Namespace.StartsWith(ModelNamespace) || t.Namespace.StartsWith(SupportNamespace))); + var typeInfos = types.Select(t => new ModelTypeInfo + { + Type = t, + TypeName = t.Name, + Properties = t.GetProperties(BindingFlags.Public | BindingFlags.Instance).Where(p => !p.GetIndexParameters().Any()).OrderBy(p => p.Name).ToArray(), + NamespaceGroup = t.Namespace.Split('.').LastOrDefault().EmptyIfNull() + }).Where(mti => mti.Properties.Any()); + var sb = UseExpandedFormat ? ExpandedFormat(typeInfos) : CondensedFormat(typeInfos); + Directory.CreateDirectory(OutputFolder); + File.WriteAllText(Path.Combine(OutputFolder, "ModelSurface.md"), sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + + private static StringBuilder ExpandedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + foreach (var typeInfo in typeInfos.OrderBy(mti => mti.TypeName).ThenBy(mti => mti.NamespaceGroup)) + { + sb.Append($"### {typeInfo.TypeName} [{typeInfo.NamespaceGroup}]{Environment.NewLine}"); + foreach (var property in typeInfo.Properties) + { + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}`{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + private static StringBuilder CondensedFormat(IEnumerable typeInfos) + { + var sb = new StringBuilder(); + var typeGroups = typeInfos + .GroupBy(mti => mti.TypeName) + .Select(tig => ( + Types: tig.Select(mti => mti.Type).ToArray(), + TypeName: tig.Key, + Properties: tig.SelectMany(mti => mti.Properties).DistinctBy(p => p.Name).OrderBy(p => p.Name).ToArray(), + NamespaceGroups: tig.Select(mti => mti.NamespaceGroup).OrderBy(ng => ng).ToArray() + )) + .OrderBy(tg => tg.TypeName); + foreach (var typeGroup in typeGroups) + { + var aType = typeGroup.Types.Select(GetAssociativeType).FirstOrDefault(t => t != null); + var aText = aType != null ? $@" \<{aType.ToSyntaxTypeName()}\>" : String.Empty; + sb.Append($"### {typeGroup.TypeName}{aText} [{String.Join(", ", typeGroup.NamespaceGroups)}]{Environment.NewLine}"); + foreach (var property in typeGroup.Properties) + { + var propertyAType = GetAssociativeType(property.PropertyType); + var propertyAText = propertyAType != null ? $" <{propertyAType.ToSyntaxTypeName()}>" : String.Empty; + var enumNames = GetEnumFieldNames(property.PropertyType.Unwrap()); + var enumNamesText = enumNames.Any() ? $" **{{{String.Join(", ", enumNames)}}}**" : String.Empty; + sb.Append($" - {property.Name} `{property.PropertyType.ToSyntaxTypeName()}{propertyAText}`{enumNamesText}{Environment.NewLine}"); + } + sb.AppendLine(); + } + + return sb; + } + + //https://stackoverflow.com/a/4963190/294804 + private static Type GetAssociativeType(Type type) => + type.GetInterfaces().FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>))?.GetGenericArguments().First(); + + private static string[] GetEnumFieldNames(Type type) => + type.IsValueType && !type.IsPrimitive && type != typeof(decimal) && type != typeof(DateTime) + ? type.GetFields(BindingFlags.Public | BindingFlags.Static).Where(f => f.FieldType == type).Select(p => p.Name).ToArray() + : new string[] { }; + + private class ModelTypeInfo + { + public Type Type { get; set; } + public string TypeName { get; set; } + public PropertyInfo[] Properties { get; set; } + public string NamespaceGroup { get; set; } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs new file mode 100644 index 000000000000..85a37c57ae4c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportProxyCmdlet.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpers; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.MarkdownRenderer; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsProxyTypeExtensions; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "ProxyCmdlet", DefaultParameterSetName = "Docs")] + [DoNotExport] + public class ExportProxyCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string[] ModulePath { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string InternalFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [AllowEmptyString] + public string ModuleDescription { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + [ValidateNotNullOrEmpty] + public string DocsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExamplesFolder { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "Docs")] + public Guid ModuleGuid { get; set; } + + [Parameter(Mandatory = true, ParameterSetName = "NoDocs")] + public SwitchParameter ExcludeDocs { get; set; } + + [Parameter(ParameterSetName = "Docs")] + public SwitchParameter AddComplexInterfaceInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = GetModuleCmdletsAndHelpInfo(this, ModulePath).SelectMany(ci => ci.ToVariants()).Where(v => !v.IsDoNotExport).ToArray(); + var allProfiles = variants.SelectMany(v => v.Profiles).Distinct().ToArray(); + var profileGroups = allProfiles.Any() + ? variants + .SelectMany(v => (v.Profiles.Any() ? v.Profiles : allProfiles).Select(p => (profile: p, variant: v))) + .GroupBy(pv => pv.profile) + .Select(pvg => new ProfileGroup(pvg.Select(pv => pv.variant).ToArray(), pvg.Key)) + : new[] { new ProfileGroup(variants) }; + var variantGroups = profileGroups.SelectMany(pg => pg.Variants + .GroupBy(v => new { v.CmdletName, v.IsInternal }) + .Select(vg => new VariantGroup(ModuleName, vg.Key.CmdletName, vg.Select(v => v).ToArray(), + Path.Combine(vg.Key.IsInternal ? InternalFolder : ExportsFolder, pg.ProfileFolder), pg.ProfileName, isInternal: vg.Key.IsInternal))) + .ToArray(); + + var license = new StringBuilder(); + license.Append(@" +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +"); + HashSet LicenseSet = new HashSet(); + foreach (var variantGroup in variantGroups) + { + var parameterGroups = variantGroup.ParameterGroups.ToList(); + var isValidProfile = !String.IsNullOrEmpty(variantGroup.ProfileName) && variantGroup.ProfileName != NoProfiles; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, variantGroup.ProfileName) : ExamplesFolder; + var markdownInfo = new MarkdownHelpInfo(variantGroup, examplesFolder); + List examples = new List(); + foreach (var it in markdownInfo.Examples) + { + examples.Add(it); + } + variantGroup.HelpInfo.Examples = examples.ToArray(); + var sb = new StringBuilder(); + sb.Append($"{Environment.NewLine}"); + sb.Append(variantGroup.ToHelpCommentOutput()); + sb.Append($"function {variantGroup.CmdletName} {{{Environment.NewLine}"); + sb.Append(variantGroup.Aliases.ToAliasOutput()); + sb.Append(variantGroup.OutputTypes.ToOutputTypeOutput()); + sb.Append(variantGroup.ToCmdletBindingOutput()); + sb.Append(variantGroup.ProfileName.ToProfileOutput()); + + sb.Append("param("); + sb.Append($"{(parameterGroups.Any() ? Environment.NewLine : String.Empty)}"); + foreach (var parameterGroup in parameterGroups) + { + var parameters = parameterGroup.HasAllVariants ? parameterGroup.Parameters.Take(1) : parameterGroup.Parameters; + parameters = parameters.Where(p => !p.IsHidden()); + if (!parameters.Any()) + { + continue; + } + foreach (var parameter in parameters) + { + sb.Append(parameter.ToParameterOutput(variantGroup.HasMultipleVariants, parameterGroup.HasAllVariants)); + } + sb.Append(parameterGroup.Aliases.ToAliasOutput(true)); + sb.Append(parameterGroup.HasValidateNotNull.ToValidateNotNullOutput()); + sb.Append(parameterGroup.HasAllowEmptyArray.ToAllowEmptyArray()); + sb.Append(parameterGroup.CompleterInfo.ToArgumentCompleterOutput()); + sb.Append(parameterGroup.OrderCategory.ToParameterCategoryOutput()); + sb.Append(parameterGroup.InfoAttribute.ToInfoOutput(parameterGroup.ParameterType)); + sb.Append(parameterGroup.ToDefaultInfoOutput()); + sb.Append(parameterGroup.ParameterType.ToParameterTypeOutput()); + sb.Append(parameterGroup.Description.ToParameterDescriptionOutput()); + sb.Append(parameterGroup.ParameterName.ToParameterNameOutput(parameterGroups.IndexOf(parameterGroup) == parameterGroups.Count - 1)); + } + sb.Append($"){Environment.NewLine}{Environment.NewLine}"); + + sb.Append(variantGroup.ToBeginOutput()); + sb.Append(variantGroup.ToProcessOutput()); + sb.Append(variantGroup.ToEndOutput()); + + sb.Append($"}}{Environment.NewLine}"); + + Directory.CreateDirectory(variantGroup.OutputFolder); + File.WriteAllText(variantGroup.FilePath, license.ToString()); + File.AppendAllText(variantGroup.FilePath, sb.ToString()); + if (!LicenseSet.Contains(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"))) + { + // only add license in the header + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), license.ToString()); + LicenseSet.Add(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1")); + } + File.AppendAllText(Path.Combine(variantGroup.OutputFolder, "ProxyCmdletDefinitions.ps1"), sb.ToString()); + } + + if (!ExcludeDocs) + { + var moduleInfo = new PsModuleHelpInfo(ModuleName, ModuleGuid, ModuleDescription); + foreach (var variantGroupsByProfile in variantGroups.GroupBy(vg => vg.ProfileName)) + { + var profileName = variantGroupsByProfile.Key; + var isValidProfile = !String.IsNullOrEmpty(profileName) && profileName != NoProfiles; + var docsFolder = isValidProfile ? Path.Combine(DocsFolder, profileName) : DocsFolder; + var examplesFolder = isValidProfile ? Path.Combine(ExamplesFolder, profileName) : ExamplesFolder; + WriteMarkdowns(variantGroupsByProfile, moduleInfo, docsFolder, examplesFolder, AddComplexInterfaceInfo.IsPresent); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs new file mode 100644 index 000000000000..93025932ef8c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportPsd1.cs @@ -0,0 +1,191 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "Psd1")] + [DoNotExport] + public class ExportPsd1 : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string CustomFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + [Parameter(Mandatory = true)] + public Guid ModuleGuid { get; set; } + + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + private const string CustomFolderRelative = "./custom"; + private const string Indent = Psd1Indent; + private const string Undefined = "undefined"; + private bool IsUndefined(string value) => string.Equals(Undefined, value, StringComparison.OrdinalIgnoreCase); + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + if (!Directory.Exists(CustomFolder)) + { + throw new ArgumentException($"Custom folder '{CustomFolder}' does not exist"); + } + + string version = Convert.ToString(@"0.1.0"); + // Validate the module version should be semantic version + // Following regex is official from https://semver.org/ + Regex rx = new Regex(@"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$", RegexOptions.Compiled); + if (rx.Matches(version).Count != 1) + { + throw new ArgumentException("Module-version is not a valid Semantic Version"); + } + + string previewVersion = null; + if (version.Contains('-')) + { + string[] versions = version.Split("-".ToCharArray(), 2); + version = versions[0]; + previewVersion = versions[1]; + } + + var sb = new StringBuilder(); + sb.AppendLine("@{"); + sb.AppendLine($@"{GuidStart} = '{ModuleGuid}'"); + sb.AppendLine($@"{Indent}RootModule = '{"./Az.OracleDatabaseResourceManager.psm1"}'"); + sb.AppendLine($@"{Indent}ModuleVersion = '{version}'"); + sb.AppendLine($@"{Indent}CompatiblePSEditions = 'Core', 'Desktop'"); + sb.AppendLine($@"{Indent}Author = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}CompanyName = '{"Microsoft Corporation"}'"); + sb.AppendLine($@"{Indent}Copyright = '{"Microsoft Corporation. All rights reserved."}'"); + sb.AppendLine($@"{Indent}Description = '{"Microsoft Azure PowerShell: OracleDatabaseResourceManager cmdlets"}'"); + sb.AppendLine($@"{Indent}PowerShellVersion = '5.1'"); + sb.AppendLine($@"{Indent}DotNetFrameworkVersion = '4.7.2'"); + + // RequiredModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredModules = @({"undefined"})"); + } + + // RequiredAssemblies + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}RequiredAssemblies = @({"undefined"})"); + } + else + { + sb.AppendLine($@"{Indent}RequiredAssemblies = '{"./bin/Az.OracleDatabaseResourceManager.private.dll"}'"); + } + + // NestedModules + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}NestedModules = @({"undefined"})"); + } + + // FormatsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FormatsToProcess = @({"undefined"})"); + } + else + { + var customFormatPs1xmlFiles = Directory.GetFiles(CustomFolder) + .Where(f => f.EndsWith(".format.ps1xml")) + .Select(f => $"{CustomFolderRelative}/{Path.GetFileName(f)}"); + var formatList = customFormatPs1xmlFiles.Prepend("./Az.OracleDatabaseResourceManager.format.ps1xml").ToPsList(); + sb.AppendLine($@"{Indent}FormatsToProcess = {formatList}"); + } + + // TypesToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}TypesToProcess = @({"undefined"})"); + } + + // ScriptsToProcess + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}ScriptsToProcess = @({"undefined"})"); + } + + var functionInfos = GetScriptCmdlets(ExportsFolder).ToArray(); + // FunctionsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}FunctionsToExport = @({"undefined"})"); + } + else + { + var cmdletsList = functionInfos.Select(fi => fi.Name).Distinct().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}FunctionsToExport = {cmdletsList}"); + } + + // AliasesToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}AliasesToExport = @({"undefined"})"); + } + else + { + var aliasesList = functionInfos.SelectMany(fi => fi.ScriptBlock.Attributes).ToAliasNames().Append("*").ToPsList(); + sb.AppendLine($@"{Indent}AliasesToExport = {aliasesList}"); + } + + // CmdletsToExport + if (!IsUndefined("undefined")) + { + sb.AppendLine($@"{Indent}CmdletsToExport = @({"undefined"})"); + } + + sb.AppendLine($@"{Indent}PrivateData = @{{"); + sb.AppendLine($@"{Indent}{Indent}PSData = @{{"); + + if (previewVersion != null) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Prerelease = '{previewVersion}'"); + } + sb.AppendLine($@"{Indent}{Indent}{Indent}Tags = {"Azure ResourceManager ARM PSModule OracleDatabaseResourceManager".Split(' ').ToPsList().NullIfEmpty() ?? "''"}"); + sb.AppendLine($@"{Indent}{Indent}{Indent}LicenseUri = '{"https://aka.ms/azps-license"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ProjectUri = '{"https://github.com/Azure/azure-powershell"}'"); + sb.AppendLine($@"{Indent}{Indent}{Indent}ReleaseNotes = ''"); + var profilesList = ""; + if (IsAzure && !String.IsNullOrEmpty(profilesList)) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}Profiles = {profilesList}"); + } + + sb.AppendLine($@"{Indent}{Indent}}}"); + sb.AppendLine($@"{Indent}}}"); + sb.AppendLine(@"}"); + + File.WriteAllText(Psd1Path, sb.ToString()); + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs new file mode 100644 index 000000000000..806f9ac656e4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/ExportTestStub.cs @@ -0,0 +1,148 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsData.Export, "TestStub")] + [DoNotExport] + public class ExportTestStub : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ModuleName { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ExportsFolder { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string OutputFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeGenerated { get; set; } + + protected override void ProcessRecord() + { + try + { + if (!Directory.Exists(ExportsFolder)) + { + throw new ArgumentException($"Exports folder '{ExportsFolder}' does not exist"); + } + + var exportDirectories = Directory.GetDirectories(ExportsFolder); + if (!exportDirectories.Any()) + { + exportDirectories = new[] { ExportsFolder }; + } + var utilFile = Path.Combine(OutputFolder, "utils.ps1"); + if (!File.Exists(utilFile)) + { + var sc = new StringBuilder(); + sc.AppendLine(@"function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} +"); + File.WriteAllText(utilFile, sc.ToString()); + } + foreach (var exportDirectory in exportDirectories) + { + var outputFolder = OutputFolder; + if (exportDirectory != ExportsFolder) + { + outputFolder = Path.Combine(OutputFolder, Path.GetFileName(exportDirectory)); + Directory.CreateDirectory(outputFolder); + } + + var variantGroups = GetScriptCmdlets(exportDirectory) + .SelectMany(fi => fi.ToVariants()) + .Where(v => !v.IsDoNotExport) + .GroupBy(v => v.CmdletName) + .Select(vg => new VariantGroup(ModuleName, vg.Key, vg.Select(v => v).ToArray(), outputFolder, isTest: true)) + .Where(vtg => !File.Exists(vtg.FilePath) && (IncludeGenerated || !vtg.IsGenerated)); + + foreach (var variantGroup in variantGroups) + { + var sb = new StringBuilder(); + sb.AppendLine($"if(($null -eq $TestName) -or ($TestName -contains '{variantGroup.CmdletName}'))"); + sb.AppendLine(@"{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath)" +); + sb.AppendLine($@" $TestRecordingFile = Join-Path $PSScriptRoot '{variantGroup.CmdletName}.Recording.json'"); + sb.AppendLine(@" $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} +"); + + + sb.AppendLine($"Describe '{variantGroup.CmdletName}' {{"); + var variants = variantGroup.Variants + .Where(v => IncludeGenerated || !v.Attributes.OfType().Any()) + .ToList(); + + foreach (var variant in variants) + { + sb.AppendLine($"{Indent}It '{variant.VariantName}' -skip {{"); + sb.AppendLine($"{Indent}{Indent}{{ throw [System.NotImplementedException] }} | Should -Not -Throw"); + var variantSeparator = variants.IndexOf(variant) == variants.Count - 1 ? String.Empty : Environment.NewLine; + sb.AppendLine($"{Indent}}}{variantSeparator}"); + } + sb.AppendLine("}"); + + File.WriteAllText(variantGroup.FilePath, sb.ToString()); + } + } + } + catch (Exception ee) + { + Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs new file mode 100644 index 000000000000..30598412e739 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetCommonParameter.cs @@ -0,0 +1,52 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "CommonParameter")] + [OutputType(typeof(Dictionary))] + [DoNotExport] + public class GetCommonParameter : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public PSCmdlet PSCmdlet { get; set; } + + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public Dictionary PSBoundParameter { get; set; } + + protected override void ProcessRecord() + { + try + { + var variants = PSCmdlet.MyInvocation.MyCommand.ToVariants(); + var commonParameterNames = variants.ToParameterGroups() + .Where(pg => pg.OrderCategory == ParameterCategory.Azure || pg.OrderCategory == ParameterCategory.Runtime) + .Select(pg => pg.ParameterName); + if (variants.Any(v => v.SupportsShouldProcess)) + { + commonParameterNames = commonParameterNames.Append("Confirm").Append("WhatIf"); + } + if (variants.Any(v => v.SupportsPaging)) + { + commonParameterNames = commonParameterNames.Append("First").Append("Skip").Append("IncludeTotalCount"); + } + + var names = commonParameterNames.ToArray(); + var keys = PSBoundParameter.Keys.Where(k => names.Contains(k)); + WriteObject(keys.ToDictionary(key => key, key => PSBoundParameter[key]), true); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs new file mode 100644 index 000000000000..27cb9bf0ec5a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetModuleGuid.cs @@ -0,0 +1,31 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ModuleGuid")] + [DoNotExport] + public class GetModuleGuid : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string Psd1Path { get; set; } + + protected override void ProcessRecord() + { + try + { + WriteObject(ReadGuidFromPsd1(Psd1Path)); + } + catch (System.Exception ee) + { + System.Console.WriteLine($"${ee.GetType().Name}/{ee.StackTrace}"); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs new file mode 100644 index 000000000000..32992da58ce8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Cmdlets/GetScriptCmdlet.cs @@ -0,0 +1,54 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpers; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + [Cmdlet(VerbsCommon.Get, "ScriptCmdlet")] + [OutputType(typeof(string[]))] + [DoNotExport] + public class GetScriptCmdlet : PSCmdlet + { + [Parameter(Mandatory = true)] + [ValidateNotNullOrEmpty] + public string ScriptFolder { get; set; } + + [Parameter] + public SwitchParameter IncludeDoNotExport { get; set; } + + [Parameter] + public SwitchParameter AsAlias { get; set; } + + [Parameter] + public SwitchParameter AsFunctionInfo { get; set; } + + protected override void ProcessRecord() + { + try + { + var functionInfos = GetScriptCmdlets(this, ScriptFolder) + .Where(fi => IncludeDoNotExport || !fi.ScriptBlock.Attributes.OfType().Any()) + .ToArray(); + if (AsFunctionInfo) + { + WriteObject(functionInfos, true); + return; + } + var aliases = functionInfos.SelectMany(i => i.ScriptBlock.Attributes).ToAliasNames(); + var names = functionInfos.Select(fi => fi.Name).Distinct(); + var output = (AsAlias ? aliases : names).DefaultIfEmpty("''").ToArray(); + WriteObject(output, true); + } + catch (System.Exception ee) + { + System.Console.Error.WriteLine($"{ee.GetType().Name}: {ee.Message}"); + System.Console.Error.WriteLine(ee.StackTrace); + throw ee; + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/CollectionExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/CollectionExtensions.cs new file mode 100644 index 000000000000..2dde4e30d957 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/CollectionExtensions.cs @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal static class CollectionExtensions + { + public static T[] NullIfEmpty(this T[] collection) => (collection?.Any() ?? false) ? collection : null; + public static IEnumerable EmptyIfNull(this IEnumerable collection) => collection ?? Enumerable.Empty(); + + // https://stackoverflow.com/a/4158364/294804 + public static IEnumerable DistinctBy(this IEnumerable collection, Func selector) => + collection.GroupBy(selector).Select(group => group.First()); + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/MarkdownRenderer.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/MarkdownRenderer.cs new file mode 100644 index 000000000000..52135701475d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/MarkdownRenderer.cs @@ -0,0 +1,122 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsProxyOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal static class MarkdownRenderer + { + public static void WriteMarkdowns(IEnumerable variantGroups, PsModuleHelpInfo moduleHelpInfo, string docsFolder, string examplesFolder, bool AddComplexInterfaceInfo = true) + { + Directory.CreateDirectory(docsFolder); + var markdownInfos = variantGroups.Where(vg => !vg.IsInternal).Select(vg => new MarkdownHelpInfo(vg, examplesFolder)).OrderBy(mhi => mhi.CmdletName).ToArray(); + + foreach (var markdownInfo in markdownInfos) + { + var sb = new StringBuilder(); + sb.Append(markdownInfo.ToHelpMetadataOutput()); + sb.Append($"# {markdownInfo.CmdletName}{Environment.NewLine}{Environment.NewLine}"); + sb.Append($"## SYNOPSIS{Environment.NewLine}{markdownInfo.Synopsis.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## SYNTAX{Environment.NewLine}{Environment.NewLine}"); + var hasMultipleParameterSets = markdownInfo.SyntaxInfos.Length > 1; + foreach (var syntaxInfo in markdownInfo.SyntaxInfos) + { + sb.Append(syntaxInfo.ToHelpSyntaxOutput(hasMultipleParameterSets)); + } + + sb.Append($"## DESCRIPTION{Environment.NewLine}{markdownInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## EXAMPLES{Environment.NewLine}{Environment.NewLine}"); + foreach (var exampleInfo in markdownInfo.Examples) + { + sb.Append(exampleInfo.ToHelpExampleOutput()); + } + + sb.Append($"## PARAMETERS{Environment.NewLine}{Environment.NewLine}"); + foreach (var parameter in markdownInfo.Parameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + if (markdownInfo.SupportsShouldProcess) + { + foreach (var parameter in SupportsShouldProcessParameters) + { + sb.Append(parameter.ToHelpParameterOutput()); + } + } + + sb.Append($"### CommonParameters{Environment.NewLine}This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## INPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var input in markdownInfo.Inputs) + { + sb.Append($"### {input}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## OUTPUTS{Environment.NewLine}{Environment.NewLine}"); + foreach (var output in markdownInfo.Outputs) + { + sb.Append($"### {output}{Environment.NewLine}{Environment.NewLine}"); + } + + sb.Append($"## NOTES{Environment.NewLine}{Environment.NewLine}"); + if (markdownInfo.Aliases.Any()) + { + sb.Append($"ALIASES{Environment.NewLine}{Environment.NewLine}"); + } + foreach (var alias in markdownInfo.Aliases) + { + sb.Append($"{alias}{Environment.NewLine}{Environment.NewLine}"); + } + + if (AddComplexInterfaceInfo) + { + if (markdownInfo.ComplexInterfaceInfos.Any()) + { + sb.Append($"{ComplexParameterHeader}{Environment.NewLine}"); + } + foreach (var complexInterfaceInfo in markdownInfo.ComplexInterfaceInfos) + { + sb.Append($"{complexInterfaceInfo.ToNoteOutput(includeDashes: true, includeBackticks: true)}{Environment.NewLine}{Environment.NewLine}"); + } + + } + + sb.Append($"## RELATED LINKS{Environment.NewLine}{Environment.NewLine}"); + foreach (var relatedLink in markdownInfo.RelatedLinks) + { + sb.Append($"{relatedLink}{Environment.NewLine}{Environment.NewLine}"); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{markdownInfo.CmdletName}.md"), sb.ToString()); + } + + WriteModulePage(moduleHelpInfo, markdownInfos, docsFolder); + } + + private static void WriteModulePage(PsModuleHelpInfo moduleInfo, MarkdownHelpInfo[] markdownInfos, string docsFolder) + { + var sb = new StringBuilder(); + sb.Append(moduleInfo.ToModulePageMetadataOutput()); + sb.Append($"# {moduleInfo.Name} Module{Environment.NewLine}"); + sb.Append($"## Description{Environment.NewLine}{moduleInfo.Description.ToDescriptionFormat()}{Environment.NewLine}{Environment.NewLine}"); + + sb.Append($"## {moduleInfo.Name} Cmdlets{Environment.NewLine}"); + foreach (var markdownInfo in markdownInfos) + { + sb.Append(markdownInfo.ToModulePageCmdletOutput()); + } + + File.WriteAllText(Path.Combine(docsFolder, $"{moduleInfo.Name}.md"), sb.ToString()); + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsFormatTypes.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsFormatTypes.cs new file mode 100644 index 000000000000..b17a1e9dc476 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsFormatTypes.cs @@ -0,0 +1,138 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Reflection; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal class ViewParameters + { + public Type Type { get; } + public IEnumerable Properties { get; } + + public ViewParameters(Type type, IEnumerable properties) + { + Type = type; + Properties = properties; + } + } + + internal class PropertyFormat + { + public PropertyInfo Property { get; } + public FormatTableAttribute FormatTable { get; } + + public int? Index { get; } + public string Label { get; } + public int? Width { get; } + public PropertyOrigin? Origin { get; } + + public PropertyFormat(PropertyInfo propertyInfo) + { + Property = propertyInfo; + FormatTable = Property.GetCustomAttributes().FirstOrDefault(); + var origin = Property.GetCustomAttributes().FirstOrDefault(); + + Index = FormatTable?.HasIndex ?? false ? (int?)FormatTable.Index : null; + Label = FormatTable?.Label ?? propertyInfo.Name; + Width = FormatTable?.HasWidth ?? false ? (int?)FormatTable.Width : null; + // If we have an index, we don't want to use Origin. + Origin = FormatTable?.HasIndex ?? false ? null : origin?.Origin; + } + } + + [Serializable] + [XmlRoot(nameof(Configuration))] + public class Configuration + { + [XmlElement("ViewDefinitions")] + public ViewDefinitions ViewDefinitions { get; set; } + } + + [Serializable] + public class ViewDefinitions + { + //https://stackoverflow.com/a/10518657/294804 + [XmlElement("View")] + public List Views { get; set; } + } + + [Serializable] + public class View + { + [XmlElement(nameof(Name))] + public string Name { get; set; } + [XmlElement(nameof(ViewSelectedBy))] + public ViewSelectedBy ViewSelectedBy { get; set; } + [XmlElement(nameof(TableControl))] + public TableControl TableControl { get; set; } + } + + [Serializable] + public class ViewSelectedBy + { + [XmlElement(nameof(TypeName))] + public string TypeName { get; set; } + } + + [Serializable] + public class TableControl + { + [XmlElement(nameof(TableHeaders))] + public TableHeaders TableHeaders { get; set; } + [XmlElement(nameof(TableRowEntries))] + public TableRowEntries TableRowEntries { get; set; } + } + + [Serializable] + public class TableHeaders + { + [XmlElement("TableColumnHeader")] + public List TableColumnHeaders { get; set; } + } + + [Serializable] + public class TableColumnHeader + { + [XmlElement(nameof(Label))] + public string Label { get; set; } + [XmlElement(nameof(Width))] + public int? Width { get; set; } + + //https://stackoverflow.com/a/4095225/294804 + public bool ShouldSerializeWidth() => Width.HasValue; + } + + [Serializable] + public class TableRowEntries + { + [XmlElement(nameof(TableRowEntry))] + public TableRowEntry TableRowEntry { get; set; } + } + + [Serializable] + public class TableRowEntry + { + [XmlElement(nameof(TableColumnItems))] + public TableColumnItems TableColumnItems { get; set; } + } + + [Serializable] + public class TableColumnItems + { + [XmlElement("TableColumnItem")] + public List TableItems { get; set; } + } + + [Serializable] + public class TableColumnItem + { + [XmlElement(nameof(PropertyName))] + public string PropertyName { get; set; } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs new file mode 100644 index 000000000000..01ce1563cf03 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsHelpMarkdownOutputs.cs @@ -0,0 +1,199 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal class HelpMetadataOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public HelpMetadataOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"--- +external help file:{(!String.IsNullOrEmpty(HelpInfo.ExternalHelpFilename) ? $" {HelpInfo.ExternalHelpFilename}" : String.Empty)} +Module Name: {HelpInfo.ModuleName} +online version: {HelpInfo.OnlineVersion} +schema: {HelpInfo.Schema.ToString(3)} +--- + +"; + } + + internal class HelpSyntaxOutput + { + public MarkdownSyntaxHelpInfo SyntaxInfo { get; } + public bool HasMultipleParameterSets { get; } + + public HelpSyntaxOutput(MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) + { + SyntaxInfo = syntaxInfo; + HasMultipleParameterSets = hasMultipleParameterSets; + } + + public override string ToString() + { + var psnText = HasMultipleParameterSets ? $"### {SyntaxInfo.ParameterSetName}{(SyntaxInfo.IsDefault ? " (Default)" : String.Empty)}{Environment.NewLine}" : String.Empty; + return $@"{psnText}``` +{SyntaxInfo.SyntaxText} +``` + +"; + } + } + + internal class HelpExampleOutput + { + private string ExampleTemplate = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + Environment.NewLine; + + private string ExampleTemplateWithOutput = + "{0}{1}" + Environment.NewLine + + "{2}" + Environment.NewLine + "{3}" + Environment.NewLine + "{4}" + Environment.NewLine + Environment.NewLine + + "{5}" + Environment.NewLine + "{6}" + Environment.NewLine + "{7}" + Environment.NewLine + Environment.NewLine + + "{8}" + Environment.NewLine + Environment.NewLine; + + public MarkdownExampleHelpInfo ExampleInfo { get; } + + public HelpExampleOutput(MarkdownExampleHelpInfo exampleInfo) + { + ExampleInfo = exampleInfo; + } + + public override string ToString() + { + if (string.IsNullOrEmpty(ExampleInfo.Output)) + { + return string.Format(ExampleTemplate, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleInfo.Description.ToDescriptionFormat()); + } + else + { + return string.Format(ExampleTemplateWithOutput, + ExampleNameHeader, ExampleInfo.Name, + ExampleCodeHeader, ExampleInfo.Code, ExampleCodeFooter, + ExampleOutputHeader, ExampleInfo.Output, ExampleOutputFooter, + ExampleInfo.Description.ToDescriptionFormat()); ; + } + } + } + + internal class HelpParameterOutput + { + public MarkdownParameterHelpInfo ParameterInfo { get; } + + public HelpParameterOutput(MarkdownParameterHelpInfo parameterInfo) + { + ParameterInfo = parameterInfo; + } + + public override string ToString() + { + var pipelineInputTypes = new[] + { + ParameterInfo.AcceptsPipelineByValue ? "ByValue" : String.Empty, + ParameterInfo.AcceptsPipelineByPropertyName ? "ByPropertyName" : String.Empty + }.JoinIgnoreEmpty(", "); + var pipelineInput = ParameterInfo.AcceptsPipelineByValue || ParameterInfo.AcceptsPipelineByPropertyName + ? $@"{true} ({pipelineInputTypes})" + : false.ToString(); + + return $@"### -{ParameterInfo.Name} +{ParameterInfo.Description.ToDescriptionFormat()} + +```yaml +Type: {ParameterInfo.Type.FullName} +Parameter Sets: {(ParameterInfo.HasAllParameterSets ? "(All)" : ParameterInfo.ParameterSetNames.JoinIgnoreEmpty(", "))} +Aliases:{(ParameterInfo.Aliases.Any() ? $" {ParameterInfo.Aliases.JoinIgnoreEmpty(", ")}" : String.Empty)} + +Required: {ParameterInfo.IsRequired} +Position: {ParameterInfo.Position} +Default value: {ParameterInfo.DefaultValue} +Accept pipeline input: {pipelineInput} +Accept wildcard characters: {ParameterInfo.AcceptsWildcardCharacters} +``` + +"; + } + } + + internal class ModulePageMetadataOutput + { + public PsModuleHelpInfo ModuleInfo { get; } + + private static string HelpLinkPrefix { get; } = @"https://learn.microsoft.com/powershell/module/"; + + public ModulePageMetadataOutput(PsModuleHelpInfo moduleInfo) + { + ModuleInfo = moduleInfo; + } + + public override string ToString() => $@"--- +Module Name: {ModuleInfo.Name} +Module Guid: {ModuleInfo.Guid} +Download Help Link: {HelpLinkPrefix}{ModuleInfo.Name.ToLowerInvariant()} +Help Version: 1.0.0.0 +Locale: en-US +--- + +"; + } + + internal class ModulePageCmdletOutput + { + public MarkdownHelpInfo HelpInfo { get; } + + public ModulePageCmdletOutput(MarkdownHelpInfo helpInfo) + { + HelpInfo = helpInfo; + } + + public override string ToString() => $@"### [{HelpInfo.CmdletName}]({HelpInfo.CmdletName}.md) +{HelpInfo.Synopsis.ToDescriptionFormat()} + +"; + } + + internal static class PsHelpOutputExtensions + { + public static string EscapeAngleBrackets(this string text) => text?.Replace("<", @"\<").Replace(">", @"\>"); + public static string ReplaceSentenceEndWithNewline(this string text) => text?.Replace(". ", $".{Environment.NewLine}").Replace(". ", $".{Environment.NewLine}"); + public static string ReplaceBrWithNewline(this string text) => text?.Replace("
", $"{Environment.NewLine}"); + public static string ToDescriptionFormat(this string text, bool escapeAngleBrackets = true) + { + var description = text?.ReplaceBrWithNewline(); + description = escapeAngleBrackets ? description?.EscapeAngleBrackets() : description; + return description?.ReplaceSentenceEndWithNewline().Trim(); + } + + public const string ExampleNameHeader = "### "; + public const string ExampleCodeHeader = "```powershell"; + public const string ExampleCodeFooter = "```"; + public const string ExampleOutputHeader = "```output"; + public const string ExampleOutputFooter = "```"; + + public static HelpMetadataOutput ToHelpMetadataOutput(this MarkdownHelpInfo helpInfo) => new HelpMetadataOutput(helpInfo); + + public static HelpSyntaxOutput ToHelpSyntaxOutput(this MarkdownSyntaxHelpInfo syntaxInfo, bool hasMultipleParameterSets) => new HelpSyntaxOutput(syntaxInfo, hasMultipleParameterSets); + + public static HelpExampleOutput ToHelpExampleOutput(this MarkdownExampleHelpInfo exampleInfo) => new HelpExampleOutput(exampleInfo); + + public static HelpParameterOutput ToHelpParameterOutput(this MarkdownParameterHelpInfo parameterInfo) => new HelpParameterOutput(parameterInfo); + + public static ModulePageMetadataOutput ToModulePageMetadataOutput(this PsModuleHelpInfo moduleInfo) => new ModulePageMetadataOutput(moduleInfo); + + public static ModulePageCmdletOutput ToModulePageCmdletOutput(this MarkdownHelpInfo helpInfo) => new ModulePageCmdletOutput(helpInfo); + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsHelpTypes.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsHelpTypes.cs new file mode 100644 index 000000000000..007dbb1a3a7b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsHelpTypes.cs @@ -0,0 +1,202 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal class PsHelpInfo + { + public string CmdletName { get; } + public string ModuleName { get; } + public string Synopsis { get; } + public string Description { get; } + public string AlertText { get; } + public string Category { get; } + public PsHelpLinkInfo OnlineVersion { get; } + public PsHelpLinkInfo[] RelatedLinks { get; } + public bool? HasCommonParameters { get; } + public bool? HasWorkflowCommonParameters { get; } + + public PsHelpTypeInfo[] InputTypes { get; } + public PsHelpTypeInfo[] OutputTypes { get; } + public PsHelpExampleInfo[] Examples { get; set; } + public string[] Aliases { get; } + + public PsParameterHelpInfo[] Parameters { get; } + public PsHelpSyntaxInfo[] Syntax { get; } + + public object Component { get; } + public object Functionality { get; } + public object PsSnapIn { get; } + public object Role { get; } + public string NonTerminatingErrors { get; } + + public PsHelpInfo(PSObject helpObject = null) + { + helpObject = helpObject ?? new PSObject(); + CmdletName = helpObject.GetProperty("Name").NullIfEmpty() ?? helpObject.GetNestedProperty("details", "name"); + ModuleName = helpObject.GetProperty("ModuleName"); + Synopsis = helpObject.GetProperty("Synopsis"); + Description = helpObject.GetProperty("description").EmptyIfNull().ToDescriptionText().NullIfEmpty() ?? + helpObject.GetNestedProperty("details", "description").EmptyIfNull().ToDescriptionText(); + AlertText = helpObject.GetNestedProperty("alertSet", "alert").EmptyIfNull().ToDescriptionText(); + Category = helpObject.GetProperty("Category"); + HasCommonParameters = helpObject.GetProperty("CommonParameters").ToNullableBool(); + HasWorkflowCommonParameters = helpObject.GetProperty("WorkflowCommonParameters").ToNullableBool(); + + var links = helpObject.GetNestedProperty("relatedLinks", "navigationLink").EmptyIfNull().Select(nl => nl.ToLinkInfo()).ToArray(); + OnlineVersion = links.FirstOrDefault(l => l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length == 1); + RelatedLinks = links.Where(l => !l.Text?.ToLowerInvariant().StartsWith("online version:") ?? links.Length != 1).ToArray(); + + InputTypes = helpObject.GetNestedProperty("inputTypes", "inputType").EmptyIfNull().Select(it => it.ToTypeInfo()).ToArray(); + OutputTypes = helpObject.GetNestedProperty("returnValues", "returnValue").EmptyIfNull().Select(rv => rv.ToTypeInfo()).ToArray(); + Examples = helpObject.GetNestedProperty("examples", "example").EmptyIfNull().Select(e => e.ToExampleInfo()).ToArray(); + Aliases = helpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); + + Parameters = helpObject.GetNestedProperty("parameters", "parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + Syntax = helpObject.GetNestedProperty("syntax", "syntaxItem").EmptyIfNull().Select(si => si.ToSyntaxInfo()).ToArray(); + + Component = helpObject.GetProperty("Component"); + Functionality = helpObject.GetProperty("Functionality"); + PsSnapIn = helpObject.GetProperty("PSSnapIn"); + Role = helpObject.GetProperty("Role"); + NonTerminatingErrors = helpObject.GetProperty("nonTerminatingErrors"); + } + } + + internal class PsHelpTypeInfo + { + public string Name { get; } + public string Description { get; } + + public PsHelpTypeInfo(PSObject typeObject) + { + Name = typeObject.GetNestedProperty("type", "name").EmptyIfNull().Trim(); + Description = typeObject.GetProperty("description").EmptyIfNull().ToDescriptionText(); + } + } + + internal class PsHelpLinkInfo + { + public string Uri { get; } + public string Text { get; } + + public PsHelpLinkInfo(PSObject linkObject) + { + Uri = linkObject.GetProperty("uri"); + Text = linkObject.GetProperty("linkText"); + } + } + + internal class PsHelpSyntaxInfo + { + public string CmdletName { get; } + public PsParameterHelpInfo[] Parameters { get; } + + public PsHelpSyntaxInfo(PSObject syntaxObject) + { + CmdletName = syntaxObject.GetProperty("name"); + Parameters = syntaxObject.GetProperty("parameter").EmptyIfNull().Select(p => p.ToPsParameterHelpInfo()).ToArray(); + } + } + + internal class PsHelpExampleInfo + { + public string Title { get; } + public string Code { get; } + public string Output { get; } + public string Remarks { get; } + + public PsHelpExampleInfo(PSObject exampleObject) + { + Title = exampleObject.GetProperty("title"); + Code = exampleObject.GetProperty("code"); + Output = exampleObject.GetProperty("output"); + Remarks = exampleObject.GetProperty("remarks").EmptyIfNull().ToDescriptionText(); + } + public PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) + { + Title = markdownExample.Name; + Code = markdownExample.Code; + Output = markdownExample.Output; + Remarks = markdownExample.Description; + } + + public static implicit operator PsHelpExampleInfo(MarkdownExampleHelpInfo markdownExample) => new PsHelpExampleInfo(markdownExample); + } + + internal class PsParameterHelpInfo + { + public string DefaultValueAsString { get; } + + public string Name { get; } + public string TypeName { get; } + public string Description { get; } + public string SupportsPipelineInput { get; } + public string PositionText { get; } + public string[] ParameterSetNames { get; } + public string[] Aliases { get; } + + public bool? SupportsGlobbing { get; } + public bool? IsRequired { get; } + public bool? IsVariableLength { get; } + public bool? IsDynamic { get; } + + public PsParameterHelpInfo(PSObject parameterHelpObject = null) + { + parameterHelpObject = parameterHelpObject ?? new PSObject(); + DefaultValueAsString = parameterHelpObject.GetProperty("defaultValue"); + Name = parameterHelpObject.GetProperty("name"); + TypeName = parameterHelpObject.GetProperty("parameterValue").NullIfEmpty() ?? parameterHelpObject.GetNestedProperty("type", "name"); + Description = parameterHelpObject.GetProperty("Description").EmptyIfNull().ToDescriptionText(); + SupportsPipelineInput = parameterHelpObject.GetProperty("pipelineInput"); + PositionText = parameterHelpObject.GetProperty("position"); + ParameterSetNames = parameterHelpObject.GetProperty("parameterSetName").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + Aliases = parameterHelpObject.GetProperty("aliases").EmptyIfNull().Split(new[] { ", " }, StringSplitOptions.RemoveEmptyEntries); + + SupportsGlobbing = parameterHelpObject.GetProperty("globbing").ToNullableBool(); + IsRequired = parameterHelpObject.GetProperty("required").ToNullableBool(); + IsVariableLength = parameterHelpObject.GetProperty("variableLength").ToNullableBool(); + IsDynamic = parameterHelpObject.GetProperty("isDynamic").ToNullableBool(); + } + } + + internal class PsModuleHelpInfo + { + public string Name { get; } + public Guid Guid { get; } + public string Description { get; } + + public PsModuleHelpInfo(PSModuleInfo moduleInfo) + : this(moduleInfo?.Name ?? String.Empty, moduleInfo?.Guid ?? Guid.NewGuid(), moduleInfo?.Description ?? String.Empty) + { + } + + public PsModuleHelpInfo(string name, Guid guid, string description) + { + Name = name; + Guid = guid; + Description = description; + } + } + + internal static class HelpTypesExtensions + { + public static PsHelpInfo ToPsHelpInfo(this PSObject helpObject) => new PsHelpInfo(helpObject); + public static PsParameterHelpInfo ToPsParameterHelpInfo(this PSObject parameterHelpObject) => new PsParameterHelpInfo(parameterHelpObject); + + public static string ToDescriptionText(this IEnumerable descriptionObject) => descriptionObject != null + ? String.Join(Environment.NewLine, descriptionObject.Select(dl => dl.GetProperty("Text").EmptyIfNull())).NullIfWhiteSpace() + : null; + public static PsHelpTypeInfo ToTypeInfo(this PSObject typeObject) => new PsHelpTypeInfo(typeObject); + public static PsHelpExampleInfo ToExampleInfo(this PSObject exampleObject) => new PsHelpExampleInfo(exampleObject); + public static PsHelpLinkInfo ToLinkInfo(this PSObject linkObject) => new PsHelpLinkInfo(linkObject); + public static PsHelpSyntaxInfo ToSyntaxInfo(this PSObject syntaxObject) => new PsHelpSyntaxInfo(syntaxObject); + public static PsModuleHelpInfo ToModuleInfo(this PSModuleInfo moduleInfo) => new PsModuleHelpInfo(moduleInfo); + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs new file mode 100644 index 000000000000..92060c45a5f5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsMarkdownTypes.cs @@ -0,0 +1,294 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.MarkdownTypesExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsHelpOutputExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal class MarkdownHelpInfo + { + public string ExternalHelpFilename { get; } + public string ModuleName { get; } + public string OnlineVersion { get; } + public Version Schema { get; } + + public string CmdletName { get; } + public string[] Aliases { get; } + public string Synopsis { get; } + public string Description { get; } + + public MarkdownSyntaxHelpInfo[] SyntaxInfos { get; } + public MarkdownExampleHelpInfo[] Examples { get; } + public MarkdownParameterHelpInfo[] Parameters { get; } + + public string[] Inputs { get; } + public string[] Outputs { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + public string[] RelatedLinks { get; } + + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public MarkdownHelpInfo(VariantGroup variantGroup, string examplesFolder, string externalHelpFilename = "") + { + ExternalHelpFilename = externalHelpFilename; + ModuleName = variantGroup.RootModuleName != "" ? variantGroup.RootModuleName : variantGroup.ModuleName; + var helpInfo = variantGroup.HelpInfo; + var commentInfo = variantGroup.CommentInfo; + Schema = Version.Parse("2.0.0"); + + CmdletName = variantGroup.CmdletName; + Aliases = (variantGroup.Aliases.NullIfEmpty() ?? helpInfo.Aliases).Where(a => a != "None").ToArray(); + Synopsis = commentInfo.Synopsis; + Description = commentInfo.Description; + + SyntaxInfos = variantGroup.Variants + .Select(v => new MarkdownSyntaxHelpInfo(v, variantGroup.ParameterGroups, v.VariantName == variantGroup.DefaultParameterSetName)) + .OrderByDescending(v => v.IsDefault).ThenBy(v => v.ParameterSetName).ToArray(); + Examples = GetExamplesFromMarkdown(examplesFolder).NullIfEmpty() + ?? helpInfo.Examples.Select(e => e.ToExampleHelpInfo()).ToArray().NullIfEmpty() + ?? DefaultExampleHelpInfos; + + Parameters = variantGroup.ParameterGroups + .Where(pg => !pg.DontShow && !pg.Parameters.All(p => p.IsHidden())) + .Select(pg => new MarkdownParameterHelpInfo( + variantGroup.Variants.SelectMany(v => v.HelpInfo.Parameters).Where(phi => phi.Name == pg.ParameterName).ToArray(), pg)) + .OrderBy(phi => phi.Name).ToArray(); + + Inputs = commentInfo.Inputs; + Outputs = commentInfo.Outputs; + + ComplexInterfaceInfos = variantGroup.ComplexInterfaceInfos; + OnlineVersion = commentInfo.OnlineVersion; + RelatedLinks = commentInfo.RelatedLinks; + + SupportsShouldProcess = variantGroup.SupportsShouldProcess; + SupportsPaging = variantGroup.SupportsPaging; + } + + private MarkdownExampleHelpInfo[] GetExamplesFromMarkdown(string examplesFolder) + { + var filePath = Path.Combine(examplesFolder, $"{CmdletName}.md"); + if (!Directory.Exists(examplesFolder) || !File.Exists(filePath)) return null; + + var lines = File.ReadAllLines(filePath); + var nameIndices = lines.Select((l, i) => l.StartsWith(ExampleNameHeader) ? i : -1).Where(i => i != -1).ToArray(); + //https://codereview.stackexchange.com/a/187148/68772 + var indexCountGroups = nameIndices.Skip(1).Append(lines.Length).Zip(nameIndices, (next, current) => (NameIndex: current, LineCount: next - current)); + var exampleGroups = indexCountGroups.Select(icg => lines.Skip(icg.NameIndex).Take(icg.LineCount).ToArray()); + return exampleGroups.Select(eg => + { + var name = eg.First().Replace(ExampleNameHeader, String.Empty); + var codeStartIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var codeEndIndex = eg.Select((l, i) => l.StartsWith(ExampleCodeFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i != codeStartIndex); + var code = codeStartIndex.HasValue && codeEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(codeStartIndex.Value + 1).Take(codeEndIndex.Value - (codeStartIndex.Value + 1))) + : String.Empty; + var outputStartIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputHeader) ? (int?)i : null).FirstOrDefault(i => i.HasValue); + var outputEndIndex = eg.Select((l, i) => l.StartsWith(ExampleOutputFooter) ? (int?)i : null).FirstOrDefault(i => i.HasValue && i > outputStartIndex); + var output = outputStartIndex.HasValue && outputEndIndex.HasValue + ? String.Join(Environment.NewLine, eg.Skip(outputStartIndex.Value + 1).Take(outputEndIndex.Value - (outputStartIndex.Value + 1))) + : String.Empty; + var descriptionStartIndex = (outputEndIndex ?? (codeEndIndex ?? 0)) + 1; + descriptionStartIndex = String.IsNullOrWhiteSpace(eg[descriptionStartIndex]) ? descriptionStartIndex + 1 : descriptionStartIndex; + var descriptionEndIndex = eg.Length - 1; + descriptionEndIndex = String.IsNullOrWhiteSpace(eg[descriptionEndIndex]) ? descriptionEndIndex - 1 : descriptionEndIndex; + var description = String.Join(Environment.NewLine, eg.Skip(descriptionStartIndex).Take((descriptionEndIndex + 1) - descriptionStartIndex)); + return new MarkdownExampleHelpInfo(name, code, output, description); + }).ToArray(); + } + } + + internal class MarkdownSyntaxHelpInfo + { + public Variant Variant { get; } + public bool IsDefault { get; } + public string ParameterSetName { get; } + public Parameter[] Parameters { get; } + public string SyntaxText { get; } + + public MarkdownSyntaxHelpInfo(Variant variant, ParameterGroup[] parameterGroups, bool isDefault) + { + Variant = variant; + IsDefault = isDefault; + ParameterSetName = Variant.VariantName; + Parameters = Variant.Parameters + .Where(p => !p.DontShow && !p.IsHidden()).OrderByDescending(p => p.IsMandatory) + //https://stackoverflow.com/a/6461526/294804 + .ThenByDescending(p => p.Position.HasValue).ThenBy(p => p.Position) + // Use the OrderCategory of the parameter group because the final order category is the highest of the group, and not the order category of the individual parameters from the variants. + .ThenBy(p => parameterGroups.First(pg => pg.ParameterName == p.ParameterName).OrderCategory).ThenBy(p => p.ParameterName).ToArray(); + SyntaxText = CreateSyntaxFormat(); + } + + //https://github.com/PowerShell/platyPS/blob/a607a926bfffe1e1a1e53c19e0057eddd0c07611/src/Markdown.MAML/Renderer/Markdownv2Renderer.cs#L29-L32 + private const int SyntaxLineWidth = 110; + private string CreateSyntaxFormat() + { + var parameterStrings = Parameters.Select(p => p.ToPropertySyntaxOutput().ToString()); + if (Variant.SupportsShouldProcess) + { + parameterStrings = parameterStrings.Append(" [-Confirm]").Append(" [-WhatIf]"); + } + parameterStrings = parameterStrings.Append(" []"); + + var lines = new List(20); + return parameterStrings.Aggregate(Variant.CmdletName, (current, ps) => + { + var combined = current + ps; + if (combined.Length <= SyntaxLineWidth) return combined; + + lines.Add(current); + return ps; + }, last => + { + lines.Add(last); + return String.Join(Environment.NewLine, lines); + }); + } + } + + internal class MarkdownExampleHelpInfo + { + public string Name { get; } + public string Code { get; } + public string Output { get; } + public string Description { get; } + + public MarkdownExampleHelpInfo(string name, string code, string output, string description) + { + Name = name; + Code = code; + Output = output; + Description = description; + } + } + + internal class MarkdownParameterHelpInfo + { + public string Name { get; set; } + public string Description { get; set; } + public Type Type { get; set; } + public string Position { get; set; } + public string DefaultValue { get; set; } + + public bool HasAllParameterSets { get; set; } + public string[] ParameterSetNames { get; set; } + public string[] Aliases { get; set; } + + public bool IsRequired { get; set; } + public bool IsDynamic { get; set; } + public bool AcceptsPipelineByValue { get; set; } + public bool AcceptsPipelineByPropertyName { get; set; } + public bool AcceptsWildcardCharacters { get; set; } + + // For use by common parameters that have no backing data in the objects themselves. + public MarkdownParameterHelpInfo() { } + + public MarkdownParameterHelpInfo(PsParameterHelpInfo[] parameterHelpInfos, ParameterGroup parameterGroup) + { + Name = parameterGroup.ParameterName; + Description = parameterGroup.Description.NullIfEmpty() + ?? parameterHelpInfos.Select(phi => phi.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + Type = parameterGroup.ParameterType; + Position = parameterGroup.FirstPosition?.ToString() + ?? parameterHelpInfos.Select(phi => phi.PositionText).FirstOrDefault(d => !String.IsNullOrEmpty(d)).ToUpperFirstCharacter().NullIfEmpty() + ?? "Named"; + // This no longer uses firstHelpInfo.DefaultValueAsString since it seems to be broken. For example, it has a value of 0 for Int32, but no default value was declared. + DefaultValue = parameterGroup.DefaultInfo?.Script ?? "None"; + + HasAllParameterSets = parameterGroup.HasAllVariants; + ParameterSetNames = (parameterGroup.Parameters.Select(p => p.VariantName).ToArray().NullIfEmpty() + ?? parameterHelpInfos.SelectMany(phi => phi.ParameterSetNames).Distinct()) + .OrderBy(psn => psn).ToArray(); + Aliases = parameterGroup.Aliases.NullIfEmpty() ?? parameterHelpInfos.SelectMany(phi => phi.Aliases).ToArray(); + + IsRequired = parameterHelpInfos.Select(phi => phi.IsRequired).FirstOrDefault(r => r == true) ?? parameterGroup.Parameters.Any(p => p.IsMandatory); + IsDynamic = parameterHelpInfos.Select(phi => phi.IsDynamic).FirstOrDefault(d => d == true) ?? false; + AcceptsPipelineByValue = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByValue")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipeline; + AcceptsPipelineByPropertyName = parameterHelpInfos.Select(phi => phi.SupportsPipelineInput?.Contains("ByPropertyName")).FirstOrDefault(bv => bv == true) ?? parameterGroup.ValueFromPipelineByPropertyName; + AcceptsWildcardCharacters = parameterGroup.SupportsWildcards; + } + } + + internal static class MarkdownTypesExtensions + { + public static MarkdownExampleHelpInfo ToExampleHelpInfo(this PsHelpExampleInfo exampleInfo) => new MarkdownExampleHelpInfo(exampleInfo.Title, exampleInfo.Code, exampleInfo.Output, exampleInfo.Remarks); + + public static MarkdownExampleHelpInfo[] DefaultExampleHelpInfos = + { + new MarkdownExampleHelpInfo("Example 1: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + new MarkdownExampleHelpInfo("Example 2: {{ Add title here }}", $@"{{{{ Add code here }}}}", $@"{{{{ Add output here }}}}", @"{{ Add description here }}"), + }; + + public static MarkdownParameterHelpInfo[] SupportsShouldProcessParameters = + { + new MarkdownParameterHelpInfo + { + Name = "Confirm", + Description ="Prompts you for confirmation before running the cmdlet.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "cf" } + }, + new MarkdownParameterHelpInfo + { + Name = "WhatIf", + Description ="Shows what would happen if the cmdlet runs. The cmdlet is not run.", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new [] { "wi" } + } + }; + + public static MarkdownParameterHelpInfo[] SupportsPagingParameters = + { + new MarkdownParameterHelpInfo + { + Name = "First", + Description ="Gets only the first 'n' objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "IncludeTotalCount", + Description ="Reports the number of objects in the data set (an integer) followed by the objects. If the cmdlet cannot determine the total count, it returns \"Unknown total count\".", + Type = typeof(SwitchParameter), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + }, + new MarkdownParameterHelpInfo + { + Name = "Skip", + Description ="Ignores the first 'n' objects and then gets the remaining objects.", + Type = typeof(ulong), + Position = "Named", + DefaultValue = "None", + HasAllParameterSets = true, + ParameterSetNames = new [] { "(All)" }, + Aliases = new string[0] + } + }; + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsProxyOutputs.cs new file mode 100644 index 000000000000..db8b1814d776 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -0,0 +1,635 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Text; +using System.Text.RegularExpressions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal class OutputTypeOutput + { + public PSTypeName[] OutputTypes { get; } + + public OutputTypeOutput(IEnumerable outputTypes) + { + OutputTypes = outputTypes.ToArray(); + } + + public override string ToString() => OutputTypes != null && OutputTypes.Any() ? $"[OutputType({OutputTypes.Select(ot => $"[{ot}]").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class CmdletBindingOutput + { + public VariantGroup VariantGroup { get; } + + public CmdletBindingOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + + public override string ToString() + { + var dpsText = VariantGroup.DefaultParameterSetName.IsValidDefaultParameterSetName() ? $"DefaultParameterSetName='{VariantGroup.DefaultParameterSetName}'" : String.Empty; + var sspText = VariantGroup.SupportsShouldProcess ? $"SupportsShouldProcess{ItemSeparator}ConfirmImpact='Medium'" : String.Empty; + var pbText = $"PositionalBinding={false.ToPsBool()}"; + var propertyText = new[] { dpsText, pbText, sspText }.JoinIgnoreEmpty(ItemSeparator); + return $"[CmdletBinding({propertyText})]{Environment.NewLine}"; + } + } + + internal class ParameterOutput + { + public Parameter Parameter { get; } + public bool HasMultipleVariantsInVariantGroup { get; } + public bool HasAllVariantsInParameterGroup { get; } + + public ParameterOutput(Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) + { + Parameter = parameter; + HasMultipleVariantsInVariantGroup = hasMultipleVariantsInVariantGroup; + HasAllVariantsInParameterGroup = hasAllVariantsInParameterGroup; + } + + public override string ToString() + { + var psnText = HasMultipleVariantsInVariantGroup && !HasAllVariantsInParameterGroup ? $"ParameterSetName='{Parameter.VariantName}'" : String.Empty; + var positionText = Parameter.Position != null ? $"Position={Parameter.Position}" : String.Empty; + var mandatoryText = Parameter.IsMandatory ? "Mandatory" : String.Empty; + var dontShowText = Parameter.DontShow ? "DontShow" : String.Empty; + var vfpText = Parameter.ValueFromPipeline ? "ValueFromPipeline" : String.Empty; + var vfpbpnText = Parameter.ValueFromPipelineByPropertyName ? "ValueFromPipelineByPropertyName" : String.Empty; + var propertyText = new[] { psnText, positionText, mandatoryText, dontShowText, vfpText, vfpbpnText }.JoinIgnoreEmpty(ItemSeparator); + return $"{Indent}[Parameter({propertyText})]{Environment.NewLine}"; + } + } + + internal class AliasOutput + { + public string[] Aliases { get; } + public bool IncludeIndent { get; } + + public AliasOutput(string[] aliases, bool includeIndent = false) + { + Aliases = aliases; + IncludeIndent = includeIndent; + } + + public override string ToString() => Aliases?.Any() ?? false ? $"{(IncludeIndent ? Indent : String.Empty)}[Alias({Aliases.Select(an => $"'{an}'").JoinIgnoreEmpty(ItemSeparator)})]{Environment.NewLine}" : String.Empty; + } + + internal class ValidateNotNullOutput + { + public bool HasValidateNotNull { get; } + + public ValidateNotNullOutput(bool hasValidateNotNull) + { + HasValidateNotNull = hasValidateNotNull; + } + + public override string ToString() => HasValidateNotNull ? $"{Indent}[ValidateNotNull()]{Environment.NewLine}" : String.Empty; + } + + internal class AllowEmptyArrayOutput + { + public bool HasAllowEmptyArray { get; } + + public AllowEmptyArrayOutput(bool hasAllowEmptyArray) + { + HasAllowEmptyArray = hasAllowEmptyArray; + } + + public override string ToString() => HasAllowEmptyArray ? $"{Indent}[AllowEmptyCollection()]{Environment.NewLine}" : String.Empty; + } + internal class ArgumentCompleterOutput + { + public CompleterInfo CompleterInfo { get; } + + public ArgumentCompleterOutput(CompleterInfo completerInfo) + { + CompleterInfo = completerInfo; + } + + public override string ToString() => CompleterInfo != null + ? $"{Indent}[ArgumentCompleter({(CompleterInfo.IsTypeCompleter ? $"[{CompleterInfo.Type.Unwrap().ToPsType()}]" : $"{{{CompleterInfo.Script.ToPsSingleLine("; ")}}}")})]{Environment.NewLine}" + : String.Empty; + } + + internal class DefaultInfoOutput + { + public bool HasDefaultInfo { get; } + public DefaultInfo DefaultInfo { get; } + + public DefaultInfoOutput(ParameterGroup parameterGroup) + { + HasDefaultInfo = parameterGroup.HasDefaultInfo; + DefaultInfo = parameterGroup.DefaultInfo; + } + + public override string ToString() + { + var nameText = !String.IsNullOrEmpty(DefaultInfo?.Name) ? $"Name='{DefaultInfo?.Name}'" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(DefaultInfo?.Description) ? $"Description='{DefaultInfo?.Description.ToPsStringLiteral()}'" : String.Empty; + var scriptText = !String.IsNullOrEmpty(DefaultInfo?.Script) ? $"Script='{DefaultInfo?.Script.ToPsSingleLine("; ")}'" : String.Empty; + var propertyText = new[] { nameText, descriptionText, scriptText }.JoinIgnoreEmpty(ItemSeparator); + return HasDefaultInfo ? $"{Indent}[{typeof(DefaultInfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class ParameterTypeOutput + { + public Type ParameterType { get; } + + public ParameterTypeOutput(Type parameterType) + { + ParameterType = parameterType; + } + + public override string ToString() => $"{Indent}[{ParameterType.ToPsType()}]{Environment.NewLine}"; + } + + internal class ParameterNameOutput + { + public string ParameterName { get; } + public bool IsLast { get; } + + public ParameterNameOutput(string parameterName, bool isLast) + { + ParameterName = parameterName; + IsLast = isLast; + } + + public override string ToString() => $"{Indent}${{{ParameterName}}}{(IsLast ? String.Empty : $",{Environment.NewLine}")}{Environment.NewLine}"; + } + + internal class BaseOutput + { + public VariantGroup VariantGroup { get; } + + protected static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public BaseOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + } + public string ClearTelemetryContext() + { + return (!VariantGroup.IsInternal && IsAzure) ? $@"{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext()" : ""; + } + } + + internal class BeginOutput : BaseOutput + { + public BeginOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + public string GetProcessCustomAttributesAtRuntime() + { + return VariantGroup.IsInternal ? "" : IsAzure ? $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet] +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}if ($null -ne $MyInvocation.MyCommand -and [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets -notcontains $MyInvocation.MyCommand.Name -and [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ContainsPreviewAttribute($cmdInfo, $MyInvocation)){{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PromptedPreviewMessageCmdlets.Enqueue($MyInvocation.MyCommand.Name) +{Indent}{Indent}}}" : $@"{Indent}{Indent}$cmdInfo = Get-Command -Name $mapping[$parameterSet]{Environment.NewLine}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.MessageAttributeHelper]::ProcessPreviewMessageAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet)"; + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() +{Indent}{Indent}}} +{Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId =(New-Guid).ToString() +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Create', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}$internalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}{Indent}if ($internalCalledCmdlets -eq '') {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} else {{ +{Indent}{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets += ',' + $MyInvocation.MyCommand.Name +{Indent}{Indent}{Indent}}} +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = 'internal' +{Indent}{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"begin {{ +{Indent}try {{ +{Indent}{Indent}$outBuffer = $null +{Indent}{Indent}if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) {{ +{Indent}{Indent}{Indent}$PSBoundParameters['OutBuffer'] = 1 +{Indent}{Indent}}} +{Indent}{Indent}$parameterSet = $PSCmdlet.ParameterSetName +{GetTelemetry()} +{GetParameterSetToCmdletMapping()}{GetDefaultValuesStatements()} +{GetProcessCustomAttributesAtRuntime()} +{Indent}{Indent}$wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) +{Indent}{Indent}$scriptCmd = {{& $wrappedCmd @PSBoundParameters}} +{Indent}{Indent}$steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) +{Indent}{Indent}$steppablePipeline.Begin($PSCmdlet) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} + +"; + + private string GetParameterSetToCmdletMapping() + { + var sb = new StringBuilder(); + sb.AppendLine($"{Indent}{Indent}$mapping = @{{"); + foreach (var variant in VariantGroup.Variants) + { + sb.AppendLine($@"{Indent}{Indent}{Indent}{variant.VariantName} = '{variant.PrivateModuleName}\{variant.PrivateCmdletName}';"); + } + sb.Append($"{Indent}{Indent}}}"); + return sb.ToString(); + } + + private string GetDefaultValuesStatements() + { + var defaultInfos = VariantGroup.ParameterGroups.Where(pg => pg.HasDefaultInfo).Select(pg => pg.DefaultInfo).ToArray(); + var sb = new StringBuilder(); + + foreach (var defaultInfo in defaultInfos) + { + var variantListString = defaultInfo.ParameterGroup.VariantNames.ToPsList(); + var parameterName = defaultInfo.ParameterGroup.ParameterName; + sb.AppendLine(); + //Yabo: this is bad to hard code the subscription id, but autorest load input README.md reversely (entry readme -> required readme), there are no other way to + //override default value set in required readme + if ("SubscriptionId".Equals(parameterName)) + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$testPlayback = $false"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['HttpPipelinePrepend'] | Foreach-Object {{ if ($_) {{ $testPlayback = $testPlayback -or ('Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock' -eq $_.Target.GetType().FullName -and 'Playback' -eq $_.Target.Mode) }} }}"); + sb.AppendLine($"{Indent}{Indent}{Indent}if ($testPlayback) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = . (Join-Path $PSScriptRoot '..' 'utils' 'Get-SubscriptionIdTestSafe.ps1')"); + sb.AppendLine($"{Indent}{Indent}{Indent}}} else {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.AppendLine($"{Indent}{Indent}{Indent}}}"); + sb.Append($"{Indent}{Indent}}}"); + } + else + { + sb.AppendLine($"{Indent}{Indent}if (({variantListString}) -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('{parameterName}')) {{"); + sb.AppendLine($"{Indent}{Indent}{Indent}$PSBoundParameters['{parameterName}'] = {defaultInfo.Script}"); + sb.Append($"{Indent}{Indent}}}"); + } + } + return sb.ToString(); + } + } + + internal class ProcessOutput : BaseOutput + { + public ProcessOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetFinally() + { + if (IsAzure && !VariantGroup.IsInternal) + { + return $@" +{Indent}finally {{ +{Indent}{Indent}$backupTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId +{Indent}{Indent}$backupInternalCalledCmdlets = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}}} +"; + } + return ""; + } + public override string ToString() => $@"process {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.Process($_) +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +{GetFinally()} +}} +"; + } + + internal class EndOutput : BaseOutput + { + public EndOutput(VariantGroup variantGroup) : base(variantGroup) + { + } + + private string GetTelemetry() + { + if (!VariantGroup.IsInternal && IsAzure) + { + return $@" +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $backupTelemetryId +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::InternalCalledCmdlets = $backupInternalCalledCmdlets +{Indent}{Indent}if ($preTelemetryId -eq '') {{ +{Indent}{Indent}{Indent}[Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.module]::Instance.Telemetry.Invoke('Send', $MyInvocation, $parameterSet, $PSCmdlet) +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::ClearTelemetryContext() +{Indent}{Indent}}} +{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId = $preTelemetryId +"; + } + return ""; + } + public override string ToString() => $@"end {{ +{Indent}try {{ +{Indent}{Indent}$steppablePipeline.End() +{GetTelemetry()} +{Indent}}} catch {{ +{ClearTelemetryContext()} +{Indent}{Indent}throw +{Indent}}} +}} +"; + } + + internal class HelpCommentOutput + { + public VariantGroup VariantGroup { get; } + public CommentInfo CommentInfo { get; } + + public HelpCommentOutput(VariantGroup variantGroup) + { + VariantGroup = variantGroup; + CommentInfo = variantGroup.CommentInfo; + } + + public override string ToString() + { + var inputs = String.Join(Environment.NewLine, CommentInfo.Inputs.Select(i => $".Inputs{Environment.NewLine}{i}")); + var inputsText = !String.IsNullOrEmpty(inputs) ? $"{Environment.NewLine}{inputs}" : String.Empty; + var outputs = String.Join(Environment.NewLine, CommentInfo.Outputs.Select(o => $".Outputs{Environment.NewLine}{o}")); + var outputsText = !String.IsNullOrEmpty(outputs) ? $"{Environment.NewLine}{outputs}" : String.Empty; + var notes = String.Join($"{Environment.NewLine}{Environment.NewLine}", VariantGroup.ComplexInterfaceInfos.Select(cii => cii.ToNoteOutput())); + var notesText = !String.IsNullOrEmpty(notes) ? $"{Environment.NewLine}.Notes{Environment.NewLine}{ComplexParameterHeader}{notes}" : String.Empty; + var relatedLinks = String.Join(Environment.NewLine, CommentInfo.RelatedLinks.Select(l => $".Link{Environment.NewLine}{l}")); + var relatedLinksText = !String.IsNullOrEmpty(relatedLinks) ? $"{Environment.NewLine}{relatedLinks}" : String.Empty; + var examples = ""; + foreach (var example in VariantGroup.HelpInfo.Examples) + { + examples = examples + ".Example" + "\r\n" + example.Code + "\r\n"; + } + return $@"<# +.Synopsis +{CommentInfo.Synopsis.ToDescriptionFormat(false)} +.Description +{CommentInfo.Description.ToDescriptionFormat(false)} +{examples}{inputsText}{outputsText}{notesText} +.Link +{CommentInfo.OnlineVersion}{relatedLinksText} +#> +"; + } + } + + internal class ParameterDescriptionOutput + { + public string Description { get; } + + public ParameterDescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) + ? Description.ToDescriptionFormat(false).NormalizeNewLines() + .Split(new[] { Environment.NewLine }, StringSplitOptions.None) + .Aggregate(String.Empty, (c, n) => c + $"{Indent}# {n}{Environment.NewLine}") + : String.Empty; + } + + internal class ProfileOutput + { + public string ProfileName { get; } + + public ProfileOutput(string profileName) + { + ProfileName = profileName; + } + + public override string ToString() => ProfileName != NoProfiles ? $"[{typeof(ProfileAttribute).ToPsAttributeType()}('{ProfileName}')]{Environment.NewLine}" : String.Empty; + } + + internal class DescriptionOutput + { + public string Description { get; } + + public DescriptionOutput(string description) + { + Description = description; + } + + public override string ToString() => !String.IsNullOrEmpty(Description) ? $"[{typeof(DescriptionAttribute).ToPsAttributeType()}('{Description.ToPsStringLiteral()}')]{Environment.NewLine}" : String.Empty; + } + + internal class ParameterCategoryOutput + { + public ParameterCategory Category { get; } + + public ParameterCategoryOutput(ParameterCategory category) + { + Category = category; + } + + public override string ToString() => $"{Indent}[{typeof(CategoryAttribute).ToPsAttributeType()}('{Category}')]{Environment.NewLine}"; + } + + internal class InfoOutput + { + public InfoAttribute Info { get; } + public Type ParameterType { get; } + + public InfoOutput(InfoAttribute info, Type parameterType) + { + Info = info; + ParameterType = parameterType; + } + + public override string ToString() + { + // Rendering of InfoAttribute members that are not used currently + /*var serializedNameText = Info.SerializedName != null ? $"SerializedName='{Info.SerializedName}'" : String.Empty; + var readOnlyText = Info.ReadOnly ? "ReadOnly" : String.Empty; + var descriptionText = !String.IsNullOrEmpty(Info.Description) ? $"Description='{Info.Description.ToPsStringLiteral()}'" : String.Empty;*/ + + var requiredText = Info.Required ? "Required" : String.Empty; + var unwrappedType = ParameterType.Unwrap(); + var hasValidPossibleTypes = Info.PossibleTypes.Any(pt => pt != unwrappedType); + var possibleTypesText = hasValidPossibleTypes + ? $"PossibleTypes=({Info.PossibleTypes.Select(pt => $"[{pt.ToPsType()}]").JoinIgnoreEmpty(ItemSeparator)})" + : String.Empty; + var propertyText = new[] { /*serializedNameText, */requiredText,/* readOnlyText,*/ possibleTypesText/*, descriptionText*/ }.JoinIgnoreEmpty(ItemSeparator); + return hasValidPossibleTypes ? $"{Indent}[{typeof(InfoAttribute).ToPsAttributeType()}({propertyText})]{Environment.NewLine}" : String.Empty; + } + } + + internal class PropertySyntaxOutput + { + public string ParameterName { get; } + public Type ParameterType { get; } + public bool IsMandatory { get; } + public int? Position { get; } + + public bool IncludeSpace { get; } + public bool IncludeDash { get; } + + public PropertySyntaxOutput(Parameter parameter) + { + ParameterName = parameter.ParameterName; + ParameterType = parameter.ParameterType; + IsMandatory = parameter.IsMandatory; + Position = parameter.Position; + IncludeSpace = true; + IncludeDash = true; + } + + public PropertySyntaxOutput(ComplexInterfaceInfo complexInterfaceInfo) + { + ParameterName = complexInterfaceInfo.Name; + ParameterType = complexInterfaceInfo.Type; + IsMandatory = complexInterfaceInfo.Required; + Position = null; + IncludeSpace = false; + IncludeDash = false; + } + + public override string ToString() + { + var leftOptional = !IsMandatory ? "[" : String.Empty; + var leftPositional = Position != null ? "[" : String.Empty; + var rightPositional = Position != null ? "]" : String.Empty; + var type = ParameterType != typeof(SwitchParameter) ? $" <{ParameterType.ToSyntaxTypeName()}>" : String.Empty; + var rightOptional = !IsMandatory ? "]" : String.Empty; + var space = IncludeSpace ? " " : String.Empty; + var dash = IncludeDash ? "-" : String.Empty; + return $"{space}{leftOptional}{leftPositional}{dash}{ParameterName}{rightPositional}{type}{rightOptional}"; + } + } + + internal static class PsProxyOutputExtensions + { + public const string NoParameters = "__NoParameters"; + + public const string AllParameterSets = "__AllParameterSets"; + + public const string HalfIndent = " "; + + public const string Indent = HalfIndent + HalfIndent; + + public const string ItemSeparator = ", "; + + public static readonly string ComplexParameterHeader = $"COMPLEX PARAMETER PROPERTIES{Environment.NewLine}{Environment.NewLine}To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.{Environment.NewLine}{Environment.NewLine}"; + + public static string ToPsBool(this bool value) => $"${value.ToString().ToLowerInvariant()}"; + + public static string ToPsType(this Type type) + { + var regex = new Regex(@"^(.*)`{1}\d+(.*)$"); + var typeText = type.ToString(); + var match = regex.Match(typeText); + return match.Success ? $"{match.Groups[1]}{match.Groups[2]}" : typeText; + } + + public static string ToPsAttributeType(this Type type) => type.ToPsType().RemoveEnd("Attribute"); + + // https://stackoverflow.com/a/5284606/294804 + private static string RemoveEnd(this string text, string suffix) => text.EndsWith(suffix) ? text.Substring(0, text.Length - suffix.Length) : text; + + public static string ToPsSingleLine(this string value, string replacer = " ") => value.ReplaceNewLines(replacer, new[] { "
", "\r\n", "\n" }); + + public static string ToPsStringLiteral(this string value) => value?.Replace("'", "''").Replace("‘", "''").Replace("’", "''").ToPsSingleLine().Trim() ?? String.Empty; + + public static string JoinIgnoreEmpty(this IEnumerable values, string separator) => String.Join(separator, values?.Where(v => !String.IsNullOrEmpty(v))); + + // https://stackoverflow.com/a/41961738/294804 + public static string ToSyntaxTypeName(this Type type) + { + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>)) + { + return $"{type.GetGenericArguments().First().ToSyntaxTypeName()}?"; + } + + if (type.IsGenericType) + { + var genericTypes = String.Join(ItemSeparator, type.GetGenericArguments().Select(ToSyntaxTypeName)); + return $"{type.Name.Split('`').First()}<{genericTypes}>"; + } + + return type.Name; + } + + public static OutputTypeOutput ToOutputTypeOutput(this IEnumerable outputTypes) => new OutputTypeOutput(outputTypes); + + public static CmdletBindingOutput ToCmdletBindingOutput(this VariantGroup variantGroup) => new CmdletBindingOutput(variantGroup); + + public static ParameterOutput ToParameterOutput(this Parameter parameter, bool hasMultipleVariantsInVariantGroup, bool hasAllVariantsInParameterGroup) => new ParameterOutput(parameter, hasMultipleVariantsInVariantGroup, hasAllVariantsInParameterGroup); + + public static AliasOutput ToAliasOutput(this string[] aliases, bool includeIndent = false) => new AliasOutput(aliases, includeIndent); + + public static ValidateNotNullOutput ToValidateNotNullOutput(this bool hasValidateNotNull) => new ValidateNotNullOutput(hasValidateNotNull); + + public static AllowEmptyArrayOutput ToAllowEmptyArray(this bool hasAllowEmptyArray) => new AllowEmptyArrayOutput(hasAllowEmptyArray); + + public static ArgumentCompleterOutput ToArgumentCompleterOutput(this CompleterInfo completerInfo) => new ArgumentCompleterOutput(completerInfo); + + public static DefaultInfoOutput ToDefaultInfoOutput(this ParameterGroup parameterGroup) => new DefaultInfoOutput(parameterGroup); + + public static ParameterTypeOutput ToParameterTypeOutput(this Type parameterType) => new ParameterTypeOutput(parameterType); + + public static ParameterNameOutput ToParameterNameOutput(this string parameterName, bool isLast) => new ParameterNameOutput(parameterName, isLast); + + public static BeginOutput ToBeginOutput(this VariantGroup variantGroup) => new BeginOutput(variantGroup); + + public static ProcessOutput ToProcessOutput(this VariantGroup variantGroup) => new ProcessOutput(variantGroup); + + public static EndOutput ToEndOutput(this VariantGroup variantGroup) => new EndOutput(variantGroup); + + public static HelpCommentOutput ToHelpCommentOutput(this VariantGroup variantGroup) => new HelpCommentOutput(variantGroup); + + public static ParameterDescriptionOutput ToParameterDescriptionOutput(this string description) => new ParameterDescriptionOutput(description); + + public static ProfileOutput ToProfileOutput(this string profileName) => new ProfileOutput(profileName); + + public static DescriptionOutput ToDescriptionOutput(this string description) => new DescriptionOutput(description); + + public static ParameterCategoryOutput ToParameterCategoryOutput(this ParameterCategory category) => new ParameterCategoryOutput(category); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this Parameter parameter) => new PropertySyntaxOutput(parameter); + + public static PropertySyntaxOutput ToPropertySyntaxOutput(this ComplexInterfaceInfo complexInterfaceInfo) => new PropertySyntaxOutput(complexInterfaceInfo); + + public static InfoOutput ToInfoOutput(this InfoAttribute info, Type parameterType) => new InfoOutput(info, parameterType); + + public static string ToNoteOutput(this ComplexInterfaceInfo complexInterfaceInfo, string currentIndent = "", bool includeDashes = false, bool includeBackticks = false, bool isFirst = true) + { + string RenderProperty(ComplexInterfaceInfo info, string indent, bool dash, bool backtick) => + $"{indent}{(dash ? "- " : String.Empty)}{(backtick ? "`" : String.Empty)}{info.ToPropertySyntaxOutput()}{(backtick ? "`" : String.Empty)}: {info.Description}"; + + var nested = complexInterfaceInfo.NestedInfos.Select(ni => + { + var nestedIndent = $"{currentIndent}{HalfIndent}"; + return ni.IsComplexInterface + ? ni.ToNoteOutput(nestedIndent, includeDashes, includeBackticks, false) + : RenderProperty(ni, nestedIndent, includeDashes, includeBackticks); + }).Prepend(RenderProperty(complexInterfaceInfo, currentIndent, !isFirst && includeDashes, includeBackticks)); + return String.Join(Environment.NewLine, nested); + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsProxyTypes.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsProxyTypes.cs new file mode 100644 index 000000000000..edd02a3366f0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/Models/PsProxyTypes.cs @@ -0,0 +1,514 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using System.Reflection; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsProxyOutputExtensions; +using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell.PsProxyTypeExtensions; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal class ProfileGroup + { + public string ProfileName { get; } + public Variant[] Variants { get; } + public string ProfileFolder { get; } + + public ProfileGroup(Variant[] variants, string profileName = NoProfiles) + { + ProfileName = profileName; + Variants = variants; + ProfileFolder = ProfileName != NoProfiles ? ProfileName : String.Empty; + } + } + + internal class VariantGroup + { + public string ModuleName { get; } + + public string RootModuleName {get => @"";} + public string CmdletName { get; } + public string CmdletVerb { get; } + public string CmdletNoun { get; } + public string ProfileName { get; } + public Variant[] Variants { get; } + public ParameterGroup[] ParameterGroups { get; } + public ComplexInterfaceInfo[] ComplexInterfaceInfos { get; } + + public string[] Aliases { get; } + public PSTypeName[] OutputTypes { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + public string DefaultParameterSetName { get; } + public bool HasMultipleVariants { get; } + public PsHelpInfo HelpInfo { get; } + public bool IsGenerated { get; } + public bool IsInternal { get; } + + public string OutputFolder { get; } + public string FileName { get; } + public string FilePath { get; } + + public CommentInfo CommentInfo { get; } + + public VariantGroup(string moduleName, string cmdletName, Variant[] variants, string outputFolder, string profileName = NoProfiles, bool isTest = false, bool isInternal = false) + { + ModuleName = moduleName; + CmdletName = cmdletName; + var cmdletNameParts = CmdletName.Split('-'); + CmdletVerb = cmdletNameParts.First(); + CmdletNoun = cmdletNameParts.Last(); + ProfileName = profileName; + Variants = variants; + ParameterGroups = Variants.ToParameterGroups().OrderBy(pg => pg.OrderCategory).ThenByDescending(pg => pg.IsMandatory).ToArray(); + var aliasDuplicates = ParameterGroups.SelectMany(pg => pg.Aliases) + //https://stackoverflow.com/a/18547390/294804 + .GroupBy(a => a).Where(g => g.Count() > 1).Select(g => g.Key).ToArray(); + if (aliasDuplicates.Any()) + { + throw new ParsingMetadataException($"The alias(es) [{String.Join(", ", aliasDuplicates)}] are defined on multiple parameters for cmdlet '{CmdletName}', which is not supported."); + } + ComplexInterfaceInfos = ParameterGroups.Where(pg => !pg.DontShow && pg.IsComplexInterface).OrderBy(pg => pg.ParameterName).Select(pg => pg.ComplexInterfaceInfo).ToArray(); + + Aliases = Variants.SelectMany(v => v.Attributes).ToAliasNames().ToArray(); + OutputTypes = Variants.SelectMany(v => v.Info.OutputType).Where(ot => ot.Type != null).GroupBy(ot => ot.Type).Select(otg => otg.First()).ToArray(); + SupportsShouldProcess = Variants.Any(v => v.SupportsShouldProcess); + SupportsPaging = Variants.Any(v => v.SupportsPaging); + DefaultParameterSetName = DetermineDefaultParameterSetName(); + HasMultipleVariants = Variants.Length > 1; + HelpInfo = Variants.Select(v => v.HelpInfo).FirstOrDefault() ?? new PsHelpInfo(); + IsGenerated = Variants.All(v => v.Attributes.OfType().Any()); + IsInternal = isInternal; + + OutputFolder = outputFolder; + FileName = $"{CmdletName}{(isTest ? ".Tests" : String.Empty)}.ps1"; + FilePath = Path.Combine(OutputFolder, FileName); + + CommentInfo = new CommentInfo(this); + } + + private string DetermineDefaultParameterSetName() + { + var defaultParameterSet = Variants + .Select(v => v.Metadata.DefaultParameterSetName) + .LastOrDefault(dpsn => dpsn.IsValidDefaultParameterSetName()); + + if (String.IsNullOrEmpty(defaultParameterSet)) + { + var variantParamCountGroups = Variants + .Select(v => ( + variant: v.VariantName, + paramCount: v.CmdletOnlyParameters.Count(p => p.IsMandatory), + isSimple: v.CmdletOnlyParameters.Where(p => p.IsMandatory).All(p => p.ParameterType.IsPsSimple()))) + .GroupBy(vpc => vpc.isSimple) + .ToArray(); + var variantParameterCounts = (variantParamCountGroups.Any(g => g.Key) ? variantParamCountGroups.Where(g => g.Key) : variantParamCountGroups).SelectMany(g => g).ToArray(); + var smallestParameterCount = variantParameterCounts.Min(vpc => vpc.paramCount); + defaultParameterSet = variantParameterCounts.First(vpc => vpc.paramCount == smallestParameterCount).variant; + } + + return defaultParameterSet; + } + } + + internal class Variant + { + public string CmdletName { get; } + public string VariantName { get; } + public CommandInfo Info { get; } + public CommandMetadata Metadata { get; } + public PsHelpInfo HelpInfo { get; } + public bool HasParameterSets { get; } + public bool IsFunction { get; } + public string PrivateModuleName { get; } + public string PrivateCmdletName { get; } + public bool SupportsShouldProcess { get; } + public bool SupportsPaging { get; } + + public Attribute[] Attributes { get; } + public Parameter[] Parameters { get; } + public Parameter[] CmdletOnlyParameters { get; } + public bool IsInternal { get; } + public bool IsDoNotExport { get; } + public string[] Profiles { get; } + + public Variant(string cmdletName, string variantName, CommandInfo info, CommandMetadata metadata, bool hasParameterSets = false, PsHelpInfo helpInfo = null) + { + CmdletName = cmdletName; + VariantName = variantName; + Info = info; + HelpInfo = helpInfo ?? new PsHelpInfo(); + Metadata = metadata; + HasParameterSets = hasParameterSets; + IsFunction = Info.CommandType == CommandTypes.Function; + PrivateModuleName = Info.Source; + PrivateCmdletName = Metadata.Name; + SupportsShouldProcess = Metadata.SupportsShouldProcess; + SupportsPaging = Metadata.SupportsPaging; + + Attributes = this.ToAttributes(); + Parameters = this.ToParameters().OrderBy(p => p.OrderCategory).ThenByDescending(p => p.IsMandatory).ToArray(); + IsInternal = Attributes.OfType().Any(); + IsDoNotExport = Attributes.OfType().Any(); + CmdletOnlyParameters = Parameters.Where(p => !p.Categories.Any(c => c == ParameterCategory.Azure || c == ParameterCategory.Runtime)).ToArray(); + Profiles = Attributes.OfType().SelectMany(pa => pa.Profiles).ToArray(); + } + } + + internal class ParameterGroup + { + public string ParameterName { get; } + public Parameter[] Parameters { get; } + + public string[] VariantNames { get; } + public string[] AllVariantNames { get; } + public bool HasAllVariants { get; } + public Type ParameterType { get; } + public string Description { get; } + + public string[] Aliases { get; } + public bool HasValidateNotNull { get; } + public bool HasAllowEmptyArray { get; } + public CompleterInfo CompleterInfo { get; } + public DefaultInfo DefaultInfo { get; } + public bool HasDefaultInfo { get; } + public ParameterCategory OrderCategory { get; } + public bool DontShow { get; } + public bool IsMandatory { get; } + public bool SupportsWildcards { get; } + public bool IsComplexInterface { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public InfoAttribute InfoAttribute { get; } + + public int? FirstPosition { get; } + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public bool IsInputType { get; } + + public ParameterGroup(string parameterName, Parameter[] parameters, string[] allVariantNames) + { + ParameterName = parameterName; + Parameters = parameters; + + VariantNames = Parameters.Select(p => p.VariantName).ToArray(); + AllVariantNames = allVariantNames; + HasAllVariants = VariantNames.Any(vn => vn == AllParameterSets) || !AllVariantNames.Except(VariantNames).Any(); + var types = Parameters.Select(p => p.ParameterType).Distinct().ToArray(); + if (types.Length > 1) + { + throw new ParsingMetadataException($"The parameter '{ParameterName}' has multiple parameter types [{String.Join(", ", types.Select(t => t.Name))}] defined, which is not supported."); + } + ParameterType = types.First(); + Description = Parameters.Select(p => p.Description).FirstOrDefault(d => !String.IsNullOrEmpty(d)).EmptyIfNull(); + + Aliases = Parameters.SelectMany(p => p.Attributes).ToAliasNames().ToArray(); + HasValidateNotNull = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + HasAllowEmptyArray = Parameters.SelectMany(p => p.Attributes.OfType()).Any(); + CompleterInfo = Parameters.Select(p => p.CompleterInfoAttribute).FirstOrDefault()?.ToCompleterInfo() + ?? Parameters.Select(p => p.ArgumentCompleterAttribute).FirstOrDefault()?.ToCompleterInfo(); + DefaultInfo = Parameters.Select(p => p.DefaultInfoAttribute).FirstOrDefault()?.ToDefaultInfo(this) + ?? Parameters.Select(p => p.DefaultValueAttribute).FirstOrDefault(dv => dv != null)?.ToDefaultInfo(this); + HasDefaultInfo = DefaultInfo != null && !String.IsNullOrEmpty(DefaultInfo.Script); + // When DefaultInfo is present, force all parameters from this group to be optional. + if (HasDefaultInfo) + { + foreach (var parameter in Parameters) + { + parameter.IsMandatory = false; + } + } + OrderCategory = Parameters.Select(p => p.OrderCategory).Distinct().DefaultIfEmpty(ParameterCategory.Body).Min(); + DontShow = Parameters.All(p => p.DontShow); + IsMandatory = HasAllVariants && Parameters.Any(p => p.IsMandatory); + SupportsWildcards = Parameters.Any(p => p.SupportsWildcards); + IsComplexInterface = Parameters.Any(p => p.IsComplexInterface); + ComplexInterfaceInfo = Parameters.Where(p => p.IsComplexInterface).Select(p => p.ComplexInterfaceInfo).FirstOrDefault(); + InfoAttribute = Parameters.Select(p => p.InfoAttribute).First(); + + FirstPosition = Parameters.Select(p => p.Position).FirstOrDefault(p => p != null); + ValueFromPipeline = Parameters.Any(p => p.ValueFromPipeline); + ValueFromPipelineByPropertyName = Parameters.Any(p => p.ValueFromPipelineByPropertyName); + IsInputType = ValueFromPipeline || ValueFromPipelineByPropertyName; + } + } + + internal class Parameter + { + public string VariantName { get; } + public string ParameterName { get; } + public ParameterMetadata Metadata { get; } + public PsParameterHelpInfo HelpInfo { get; } + public Type ParameterType { get; } + + public Attribute[] Attributes { get; } + public ParameterCategory[] Categories { get; } + public ParameterCategory OrderCategory { get; } + public PSDefaultValueAttribute DefaultValueAttribute { get; } + public DefaultInfoAttribute DefaultInfoAttribute { get; } + public ParameterAttribute ParameterAttribute { get; } + public bool SupportsWildcards { get; } + public CompleterInfoAttribute CompleterInfoAttribute { get; } + public ArgumentCompleterAttribute ArgumentCompleterAttribute { get; } + + public bool ValueFromPipeline { get; } + public bool ValueFromPipelineByPropertyName { get; } + public int? Position { get; } + public bool DontShow { get; } + public bool IsMandatory { get; set; } + + public InfoAttribute InfoAttribute { get; } + public ComplexInterfaceInfo ComplexInterfaceInfo { get; } + public bool IsComplexInterface { get; } + public string Description { get; } + + public Parameter(string variantName, string parameterName, ParameterMetadata metadata, PsParameterHelpInfo helpInfo = null) + { + VariantName = variantName; + ParameterName = parameterName; + Metadata = metadata; + HelpInfo = helpInfo ?? new PsParameterHelpInfo(); + + Attributes = Metadata.Attributes.ToArray(); + ParameterType = Attributes.OfType().FirstOrDefault()?.Type ?? Metadata.ParameterType; + Categories = Attributes.OfType().SelectMany(ca => ca.Categories).Distinct().ToArray(); + OrderCategory = Categories.DefaultIfEmpty(ParameterCategory.Body).Min(); + DefaultValueAttribute = Attributes.OfType().FirstOrDefault(); + DefaultInfoAttribute = Attributes.OfType().FirstOrDefault(); + ParameterAttribute = Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == VariantName || pa.ParameterSetName == AllParameterSets); + if (ParameterAttribute == null) + { + throw new ParsingMetadataException($"The variant '{VariantName}' has multiple parameter sets defined, which is not supported."); + } + SupportsWildcards = Attributes.OfType().Any(); + CompleterInfoAttribute = Attributes.OfType().FirstOrDefault(); + ArgumentCompleterAttribute = Attributes.OfType().FirstOrDefault(); + + ValueFromPipeline = ParameterAttribute.ValueFromPipeline; + ValueFromPipelineByPropertyName = ParameterAttribute.ValueFromPipelineByPropertyName; + Position = ParameterAttribute.Position == Int32.MinValue ? (int?)null : ParameterAttribute.Position; + DontShow = ParameterAttribute.DontShow; + IsMandatory = ParameterAttribute.Mandatory; + + var complexParameterName = ParameterName.ToUpperInvariant(); + var complexMessage = $"{Environment.NewLine}To construct, see NOTES section for {complexParameterName} properties and create a hash table."; + var description = ParameterAttribute.HelpMessage.NullIfEmpty() ?? HelpInfo.Description.NullIfEmpty() ?? InfoAttribute?.Description.NullIfEmpty() ?? String.Empty; + // Remove the complex type message as it will be reinserted if this is a complex type + description = description.NormalizeNewLines().Replace(complexMessage, String.Empty).Replace(complexMessage.ToPsSingleLine(), String.Empty); + // Make an InfoAttribute for processing only if one isn't provided + InfoAttribute = Attributes.OfType().FirstOrDefault() ?? new InfoAttribute { PossibleTypes = new[] { ParameterType.Unwrap() }, Required = IsMandatory }; + // Set the description if the InfoAttribute does not have one since they are exported without a description + InfoAttribute.Description = String.IsNullOrEmpty(InfoAttribute.Description) ? description : InfoAttribute.Description; + ComplexInterfaceInfo = InfoAttribute.ToComplexInterfaceInfo(complexParameterName, ParameterType, true); + IsComplexInterface = ComplexInterfaceInfo.IsComplexInterface; + Description = $"{description}{(IsComplexInterface ? complexMessage : String.Empty)}"; + } + } + + internal class ComplexInterfaceInfo + { + public InfoAttribute InfoAttribute { get; } + + public string Name { get; } + public Type Type { get; } + public bool Required { get; } + public bool ReadOnly { get; } + public string Description { get; } + + public ComplexInterfaceInfo[] NestedInfos { get; } + public bool IsComplexInterface { get; } + + public ComplexInterfaceInfo(string name, Type type, InfoAttribute infoAttribute, bool? required, List seenTypes) + { + Name = name; + Type = type; + InfoAttribute = infoAttribute; + + Required = required ?? InfoAttribute.Required; + ReadOnly = InfoAttribute.ReadOnly; + Description = InfoAttribute.Description.ToPsSingleLine(); + + var unwrappedType = Type.Unwrap(); + var hasBeenSeen = seenTypes?.Contains(unwrappedType) ?? false; + (seenTypes ?? (seenTypes = new List())).Add(unwrappedType); + NestedInfos = hasBeenSeen ? new ComplexInterfaceInfo[]{} : + unwrappedType.GetInterfaces() + .Concat(InfoAttribute.PossibleTypes) + .SelectMany(pt => pt.GetProperties() + .SelectMany(pi => pi.GetCustomAttributes(true).OfType() + .Select(ia => ia.ToComplexInterfaceInfo(pi.Name, pi.PropertyType, seenTypes: seenTypes)))) + .Where(cii => !cii.ReadOnly).OrderByDescending(cii => cii.Required).ToArray(); + // https://stackoverflow.com/a/503359/294804 + var associativeArrayInnerType = Type.GetInterfaces() + .FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IAssociativeArray<>)) + ?.GetTypeInfo().GetGenericArguments().First(); + if (!hasBeenSeen && associativeArrayInnerType != null) + { + var anyInfo = new InfoAttribute { Description = "This indicates any property can be added to this object." }; + NestedInfos = NestedInfos.Prepend(anyInfo.ToComplexInterfaceInfo("(Any)", associativeArrayInnerType)).ToArray(); + } + IsComplexInterface = NestedInfos.Any(); + } + } + + internal class CommentInfo + { + public string Description { get; } + public string Synopsis { get; } + + public string[] Examples { get; } + public string[] Inputs { get; } + public string[] Outputs { get; } + + public string OnlineVersion { get; } + public string[] RelatedLinks { get; } + + private const string HelpLinkPrefix = @"https://learn.microsoft.com/powershell/module/"; + + public CommentInfo(VariantGroup variantGroup) + { + var helpInfo = variantGroup.HelpInfo; + Description = variantGroup.Variants.SelectMany(v => v.Attributes).OfType().FirstOrDefault()?.Description.NullIfEmpty() + ?? helpInfo.Description.EmptyIfNull(); + // If there is no Synopsis, PowerShell may put in the Syntax string as the Synopsis. This seems unintended, so we remove the Synopsis in this situation. + var synopsis = helpInfo.Synopsis.EmptyIfNull().Trim().StartsWith(variantGroup.CmdletName) ? String.Empty : helpInfo.Synopsis; + Synopsis = synopsis.NullIfEmpty() ?? Description; + + Examples = helpInfo.Examples.Select(rl => rl.Code).ToArray(); + + Inputs = (variantGroup.ParameterGroups.Where(pg => pg.IsInputType).Select(pg => pg.ParameterType.FullName).ToArray().NullIfEmpty() ?? + helpInfo.InputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(it => it.Name).ToArray()) + .Where(i => i != "None").Distinct().OrderBy(i => i).ToArray(); + Outputs = (variantGroup.OutputTypes.Select(ot => ot.Type.FullName).ToArray().NullIfEmpty() ?? + helpInfo.OutputTypes.Where(it => it.Name.NullIfWhiteSpace() != null).Select(ot => ot.Name).ToArray()) + .Where(o => o != "None").Distinct().OrderBy(o => o).ToArray(); + + // Use root module name in the help link + var moduleName = variantGroup.RootModuleName == "" ? variantGroup.ModuleName.ToLowerInvariant() : variantGroup.RootModuleName.ToLowerInvariant(); + OnlineVersion = helpInfo.OnlineVersion?.Uri.NullIfEmpty() ?? $@"{HelpLinkPrefix}{moduleName}/{variantGroup.CmdletName.ToLowerInvariant()}"; + RelatedLinks = helpInfo.RelatedLinks.Select(rl => rl.Text).ToArray(); + } + } + + internal class CompleterInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public Type Type { get; } + public bool IsTypeCompleter { get; } + + public CompleterInfo(CompleterInfoAttribute infoAttribute) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + } + + public CompleterInfo(ArgumentCompleterAttribute completerAttribute) + { + Script = completerAttribute.ScriptBlock?.ToString(); + if (completerAttribute.Type != null) + { + Type = completerAttribute.Type; + IsTypeCompleter = true; + } + } + } + + internal class DefaultInfo + { + public string Name { get; } + public string Description { get; } + public string Script { get; } + public ParameterGroup ParameterGroup { get; } + + public DefaultInfo(DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) + { + Name = infoAttribute.Name; + Description = infoAttribute.Description; + Script = infoAttribute.Script; + ParameterGroup = parameterGroup; + } + + public DefaultInfo(PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) + { + Description = defaultValueAttribute.Help; + ParameterGroup = parameterGroup; + if (defaultValueAttribute.Value != null) + { + Script = defaultValueAttribute.Value.ToString(); + } + } + } + + internal static class PsProxyTypeExtensions + { + public const string NoProfiles = "__NoProfiles"; + + public static bool IsValidDefaultParameterSetName(this string parameterSetName) => + !String.IsNullOrEmpty(parameterSetName) && parameterSetName != AllParameterSets; + + public static Variant[] ToVariants(this CommandInfo info, PsHelpInfo helpInfo) + { + var metadata = new CommandMetadata(info); + var privateCmdletName = metadata.Name.Split('!').First(); + var parts = privateCmdletName.Split('_'); + return parts.Length > 1 + ? new[] { new Variant(parts[0], parts[1], info, metadata, helpInfo: helpInfo) } + // Process multiple parameter sets, so we declare a variant per parameter set. + : info.ParameterSets.Select(ps => new Variant(privateCmdletName, ps.Name, info, metadata, true, helpInfo)).ToArray(); + } + + public static Variant[] ToVariants(this CmdletAndHelpInfo info) => info.CommandInfo.ToVariants(info.HelpInfo); + + public static Variant[] ToVariants(this CommandInfo info, PSObject helpInfo = null) => info.ToVariants(helpInfo?.ToPsHelpInfo()); + + public static Parameter[] ToParameters(this Variant variant) + { + var parameters = variant.Metadata.Parameters.AsEnumerable(); + var parameterHelp = variant.HelpInfo.Parameters.AsEnumerable(); + + if (variant.HasParameterSets) + { + parameters = parameters.Where(p => p.Value.ParameterSets.Keys.Any(k => k == variant.VariantName || k == AllParameterSets)); + parameterHelp = parameterHelp.Where(ph => (!ph.ParameterSetNames.Any() || ph.ParameterSetNames.Any(psn => psn == variant.VariantName || psn == AllParameterSets)) && ph.Name != "IncludeTotalCount"); + } + var result = parameters.Select(p => new Parameter(variant.VariantName, p.Key, p.Value, parameterHelp.FirstOrDefault(ph => ph.Name == p.Key))); + if (variant.SupportsPaging) { + // If supportsPaging is set, we will need to add First and Skip parameters since they are treated as common parameters which as not contained on Metadata>parameters + variant.Info.Parameters["First"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Gets only the first 'n' objects."; + variant.Info.Parameters["Skip"].Attributes.OfType().FirstOrDefault(pa => pa.ParameterSetName == variant.VariantName || pa.ParameterSetName == AllParameterSets).HelpMessage = "Ignores the first 'n' objects and then gets the remaining objects."; + result = result.Append(new Parameter(variant.VariantName, "First", variant.Info.Parameters["First"], parameterHelp.FirstOrDefault(ph => ph.Name == "First"))); + result = result.Append(new Parameter(variant.VariantName, "Skip", variant.Info.Parameters["Skip"], parameterHelp.FirstOrDefault(ph => ph.Name == "Skip"))); + } + return result.ToArray(); + } + + public static Attribute[] ToAttributes(this Variant variant) => variant.IsFunction + ? ((FunctionInfo)variant.Info).ScriptBlock.Attributes.ToArray() + : variant.Metadata.CommandType.GetCustomAttributes(false).Cast().ToArray(); + + public static IEnumerable ToParameterGroups(this Variant[] variants) + { + var allVariantNames = variants.Select(vg => vg.VariantName).ToArray(); + return variants + .SelectMany(v => v.Parameters) + .GroupBy(p => p.ParameterName, StringComparer.InvariantCultureIgnoreCase) + .Select(pg => new ParameterGroup(pg.Key, pg.Select(p => p).ToArray(), allVariantNames)); + } + + public static ComplexInterfaceInfo ToComplexInterfaceInfo(this InfoAttribute infoAttribute, string name, Type type, bool? required = null, List seenTypes = null) + => new ComplexInterfaceInfo(name, type, infoAttribute, required, seenTypes); + + public static CompleterInfo ToCompleterInfo(this CompleterInfoAttribute infoAttribute) => new CompleterInfo(infoAttribute); + public static CompleterInfo ToCompleterInfo(this ArgumentCompleterAttribute completerAttribute) => new CompleterInfo(completerAttribute); + + public static DefaultInfo ToDefaultInfo(this DefaultInfoAttribute infoAttribute, ParameterGroup parameterGroup) => new DefaultInfo(infoAttribute, parameterGroup); + public static DefaultInfo ToDefaultInfo(this PSDefaultValueAttribute defaultValueAttribute, ParameterGroup parameterGroup) => new DefaultInfo(defaultValueAttribute, parameterGroup); + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsAttributes.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsAttributes.cs new file mode 100644 index 000000000000..854a80524bd3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsAttributes.cs @@ -0,0 +1,121 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager +{ + [AttributeUsage(AttributeTargets.Class)] + public class DescriptionAttribute : Attribute + { + public string Description { get; } + + public DescriptionAttribute(string description) + { + Description = description; + } + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class InternalExportAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class GeneratedAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property)] + public class DoNotFormatAttribute : Attribute + { + } + + [AttributeUsage(AttributeTargets.Class)] + public class ProfileAttribute : Attribute + { + public string[] Profiles { get; } + + public ProfileAttribute(params string[] profiles) + { + Profiles = profiles; + } + } + + [AttributeUsage(AttributeTargets.Class)] + public class HttpPathAttribute : Attribute + { + public string Path { get; set; } + public string ApiVersion { get; set; } + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class CategoryAttribute : Attribute + { + public ParameterCategory[] Categories { get; } + + public CategoryAttribute(params ParameterCategory[] categories) + { + Categories = categories; + } + } + + [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)] + public class ExportAsAttribute : Attribute + { + public Type Type { get; set; } + + public ExportAsAttribute(Type type) + { + Type = type; + } + } + + public enum ParameterCategory + { + // Note: Order is significant + Uri = 0, + Path, + Query, + Header, + Cookie, + Body, + Azure, + Runtime + } + + [AttributeUsage(AttributeTargets.Property)] + public class OriginAttribute : Attribute + { + public PropertyOrigin Origin { get; } + + public OriginAttribute(PropertyOrigin origin) + { + Origin = origin; + } + } + + public enum PropertyOrigin + { + // Note: Order is significant + Inherited = 0, + Owned, + Inlined + } + + [AttributeUsage(AttributeTargets.Property)] + public class FormatTableAttribute : Attribute + { + public int Index { get; set; } = -1; + public bool HasIndex => Index != -1; + public string Label { get; set; } + public int Width { get; set; } = -1; + public bool HasWidth => Width != -1; + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsExtensions.cs new file mode 100644 index 000000000000..ce11734c2894 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsExtensions.cs @@ -0,0 +1,169 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Management.Automation; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal static class PsExtensions + { + // https://stackoverflow.com/a/863944/294804 + // https://stackoverflow.com/a/4452598/294804 + // https://stackoverflow.com/a/28701974/294804 + // Note: This will unwrap nested collections, but we don't generate nested collections. + public static Type Unwrap(this Type type) + { + if (type.IsArray) + { + return type.GetElementType().Unwrap(); + } + + var typeInfo = type.GetTypeInfo(); + if (typeInfo.IsGenericType + && (typeInfo.GetGenericTypeDefinition() == typeof(Nullable<>) || typeof(IEnumerable<>).IsAssignableFrom(type))) + { + return typeInfo.GetGenericArguments().First().Unwrap(); + } + + return type; + } + + // https://stackoverflow.com/a/863944/294804 + private static bool IsSimple(this Type type) + { + var typeInfo = type.GetTypeInfo(); + return typeInfo.IsPrimitive + || typeInfo.IsEnum + || type == typeof(string) + || type == typeof(decimal); + } + + // https://stackoverflow.com/a/32025393/294804 + private static bool HasImplicitConversion(this Type baseType, Type targetType) => + baseType.GetMethods(BindingFlags.Public | BindingFlags.Static) + .Where(mi => mi.Name == "op_Implicit" && mi.ReturnType == targetType) + .Any(mi => mi.GetParameters().FirstOrDefault()?.ParameterType == baseType); + + public static bool IsPsSimple(this Type type) + { + var unwrappedType = type.Unwrap(); + return unwrappedType.IsSimple() + || unwrappedType == typeof(SwitchParameter) + || unwrappedType == typeof(Hashtable) + || unwrappedType == typeof(PSCredential) + || unwrappedType == typeof(ScriptBlock) + || unwrappedType == typeof(DateTime) + || unwrappedType == typeof(Uri) + || unwrappedType.HasImplicitConversion(typeof(string)); + } + + public static string ToPsList(this IEnumerable items) => String.Join(", ", items.Select(i => $"'{i}'")); + + public static IEnumerable ToAliasNames(this IEnumerable attributes) => attributes.OfType().SelectMany(aa => aa.AliasNames).Distinct(); + + public static bool IsArrayAndElementTypeIsT(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return itemType.IsArray && !tType.IsArray && tType.IsAssignableFrom(itemType.GetElementType()); + } + + public static bool IsTArrayAndElementTypeIsItem(this object item) + { + var itemType = item.GetType(); + var tType = typeof(T); + return !itemType.IsArray && tType.IsArray && (tType.GetElementType()?.IsAssignableFrom(itemType) ?? false); + } + + public static bool IsTypeOrArrayOfType(this object item) => item is T || item.IsArrayAndElementTypeIsT() || item.IsTArrayAndElementTypeIsItem(); + + public static T NormalizeArrayType(this object item) + { + if (item is T result) + { + return result; + } + + if (item.IsArrayAndElementTypeIsT()) + { + var array = (T[])Convert.ChangeType(item, typeof(T[])); + return array.FirstOrDefault(); + } + + if (item.IsTArrayAndElementTypeIsItem()) + { + var tType = typeof(T); + var array = Array.CreateInstance(tType.GetElementType(), 1); + array.SetValue(item, 0); + return (T)Convert.ChangeType(array, tType); + } + + return default(T); + } + + public static T GetNestedProperty(this PSObject psObject, params string[] names) => psObject.Properties.GetNestedProperty(names); + + public static T GetNestedProperty(this PSMemberInfoCollection properties, params string[] names) + { + var lastName = names.Last(); + var nestedProperties = names.Take(names.Length - 1).Aggregate(properties, (p, n) => p?.GetProperty(n)?.Properties); + return nestedProperties != null ? nestedProperties.GetProperty(lastName) : default(T); + } + + public static T GetProperty(this PSObject psObject, string name) => psObject.Properties.GetProperty(name); + + public static T GetProperty(this PSMemberInfoCollection properties, string name) + { + switch (properties[name]?.Value) + { + case PSObject psObject when psObject.BaseObject is PSCustomObject && psObject.ImmediateBaseObject.IsTypeOrArrayOfType(): + return psObject.ImmediateBaseObject.NormalizeArrayType(); + case PSObject psObject when psObject.BaseObject.IsTypeOrArrayOfType(): + return psObject.BaseObject.NormalizeArrayType(); + case object value when value.IsTypeOrArrayOfType(): + return value.NormalizeArrayType(); + default: + return default(T); + } + } + + public static IEnumerable RunScript(this PSCmdlet cmdlet, string script) + => PsHelpers.RunScript(cmdlet.InvokeCommand, script); + + public static void RunScript(this PSCmdlet cmdlet, string script) + => cmdlet.RunScript(script); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, string script) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, script); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, string script) + => engineIntrinsics.RunScript(script); + + public static IEnumerable RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => PsHelpers.RunScript(cmdlet.InvokeCommand, block.ToString()); + + public static void RunScript(this PSCmdlet cmdlet, ScriptBlock block) + => cmdlet.RunScript(block.ToString()); + + public static IEnumerable RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => PsHelpers.RunScript(engineIntrinsics.InvokeCommand, block.ToString()); + + public static void RunScript(this EngineIntrinsics engineIntrinsics, ScriptBlock block) + => engineIntrinsics.RunScript(block.ToString()); + + /// + /// Returns if a parameter should be hidden by checking for . + /// + /// A PowerShell parameter. + public static bool IsHidden(this Parameter parameter) + { + return parameter.Attributes.Any(attr => attr is DoNotExportAttribute); + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsHelpers.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsHelpers.cs new file mode 100644 index 000000000000..ea65a99c3bc4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/PsHelpers.cs @@ -0,0 +1,105 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Management.Automation; +using Pwsh = System.Management.Automation.PowerShell; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal static class PsHelpers + { + public static IEnumerable RunScript(string script) + => Pwsh.Create().AddScript(script).Invoke(); + + public static void RunScript(string script) + => RunScript(script); + + public static IEnumerable RunScript(CommandInvocationIntrinsics cii, string script) + => cii.InvokeScript(script).Select(o => o?.BaseObject).Where(o => o != null).OfType(); + + public static void RunScript(CommandInvocationIntrinsics cii, string script) + => RunScript(cii, script); + + public static IEnumerable GetModuleCmdlets(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletsCommand = String.Join(" + ", modulePaths.Select(mp => $"(Get-Command -Module (Import-Module '{mp}' -PassThru))")); + return (cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand)) + .Where(ci => ci.CommandType != CommandTypes.Alias); + } + + public static IEnumerable GetModuleCmdlets(params string[] modulePaths) + => GetModuleCmdlets(null, modulePaths); + + public static IEnumerable GetScriptCmdlets(PSCmdlet cmdlet, string scriptFolder) + { + // https://stackoverflow.com/a/40969712/294804 + var wrappedFolder = scriptFolder.Contains("'") ? $@"""{scriptFolder}""" : $@"'{scriptFolder}'"; + var getCmdletsCommand = $@" +$currentFunctions = Get-ChildItem function: +Get-ChildItem -Path {wrappedFolder} -Recurse -Include '*.ps1' -File | ForEach-Object {{ . $_.FullName }} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} +"; + return cmdlet?.RunScript(getCmdletsCommand) ?? RunScript(getCmdletsCommand); + } + + public static IEnumerable GetScriptCmdlets(string scriptFolder) + => GetScriptCmdlets(null, scriptFolder); + + public static IEnumerable GetScriptHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var importModules = String.Join(Environment.NewLine, modulePaths.Select(mp => $"Import-Module '{mp}'")); + var getHelpCommand = $@" +$currentFunctions = Get-ChildItem function: +{importModules} +Get-ChildItem function: | Where-Object {{ ($currentFunctions -notcontains $_) -and $_.CmdletBinding }} | ForEach-Object {{ Get-Help -Name $_.Name -Full }} +"; + return cmdlet?.RunScript(getHelpCommand) ?? RunScript(getHelpCommand); + } + + public static IEnumerable GetScriptHelpInfo(params string[] modulePaths) + => GetScriptHelpInfo(null, modulePaths); + + public static IEnumerable GetModuleCmdletsAndHelpInfo(PSCmdlet cmdlet, params string[] modulePaths) + { + var getCmdletAndHelp = String.Join(" + ", modulePaths.Select(mp => + $@"(Get-Command -Module (Import-Module '{mp}' -PassThru) | Where-Object {{ $_.CommandType -ne 'Alias' }} | ForEach-Object {{ @{{ CommandInfo = $_; HelpInfo = ( invoke-command {{ try {{ Get-Help -Name $_.Name -Full }} catch{{ '' }} }} ) }} }})" + )); + return (cmdlet?.RunScript(getCmdletAndHelp) ?? RunScript(getCmdletAndHelp)) + .Select(h => new CmdletAndHelpInfo { CommandInfo = (h["CommandInfo"] as PSObject)?.BaseObject as CommandInfo, HelpInfo = h["HelpInfo"] as PSObject }); + } + + public static IEnumerable GetModuleCmdletsAndHelpInfo(params string[] modulePaths) + => GetModuleCmdletsAndHelpInfo(null, modulePaths); + + public static CmdletAndHelpInfo ToCmdletAndHelpInfo(this CommandInfo commandInfo, PSObject helpInfo) => new CmdletAndHelpInfo { CommandInfo = commandInfo, HelpInfo = helpInfo }; + + public const string Psd1Indent = " "; + public const string GuidStart = Psd1Indent + "GUID"; + + public static Guid ReadGuidFromPsd1(string psd1Path) + { + var guid = Guid.NewGuid(); + if (File.Exists(psd1Path)) + { + var currentGuid = File.ReadAllLines(psd1Path) + .FirstOrDefault(l => l.StartsWith(GuidStart))?.Split(new[] { " = " }, StringSplitOptions.RemoveEmptyEntries) + .LastOrDefault()?.Replace("'", String.Empty); + guid = currentGuid != null ? Guid.Parse(currentGuid) : guid; + } + + return guid; + } + } + + internal class CmdletAndHelpInfo + { + public CommandInfo CommandInfo { get; set; } + public PSObject HelpInfo { get; set; } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/StringExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/StringExtensions.cs new file mode 100644 index 000000000000..ddc38ee01434 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/StringExtensions.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal static class StringExtensions + { + public static string NullIfEmpty(this string text) => String.IsNullOrEmpty(text) ? null : text; + public static string NullIfWhiteSpace(this string text) => String.IsNullOrWhiteSpace(text) ? null : text; + public static string EmptyIfNull(this string text) => text ?? String.Empty; + + public static bool? ToNullableBool(this string text) => String.IsNullOrEmpty(text) ? (bool?)null : Convert.ToBoolean(text.ToLowerInvariant()); + + public static string ToUpperFirstCharacter(this string text) => String.IsNullOrEmpty(text) ? text : $"{text[0].ToString().ToUpperInvariant()}{text.Remove(0, 1)}"; + + public static string ReplaceNewLines(this string value, string replacer = " ", string[] newLineSymbols = null) + => (newLineSymbols ?? new []{ "\r\n", "\n" }).Aggregate(value.EmptyIfNull(), (current, symbol) => current.Replace(symbol, replacer)); + public static string NormalizeNewLines(this string value) => value.ReplaceNewLines("\u00A0").Replace("\u00A0", Environment.NewLine); + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/XmlExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/XmlExtensions.cs new file mode 100644 index 000000000000..aec7725b0e60 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/BuildTime/XmlExtensions.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal static class XmlExtensions + { + public static string ToXmlString(this T inputObject, bool excludeDeclaration = false) + { + var serializer = new XmlSerializer(typeof(T)); + //https://stackoverflow.com/a/760290/294804 + //https://stackoverflow.com/a/3732234/294804 + var namespaces = new XmlSerializerNamespaces(new[] { XmlQualifiedName.Empty }); + var xmlSettings = new XmlWriterSettings { OmitXmlDeclaration = excludeDeclaration, Indent = true }; + using (var stringWriter = new StringWriter()) + using (var xmlWriter = XmlWriter.Create(stringWriter, xmlSettings)) + { + serializer.Serialize(xmlWriter, inputObject, namespaces); + return stringWriter.ToString(); + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/CmdInfoHandler.cs b/swaggerci/oracle.DefaultTag/generated/runtime/CmdInfoHandler.cs new file mode 100644 index 000000000000..14682534950f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/CmdInfoHandler.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Management.Automation; +using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using NextDelegate = Func, Task>, Task>; + using SignalDelegate = Func, Task>; + + public class CmdInfoHandler + { + private readonly string processRecordId; + private readonly string parameterSetName; + private readonly InvocationInfo invocationInfo; + + public CmdInfoHandler(string processRecordId, InvocationInfo invocationInfo, string parameterSetName) + { + this.processRecordId = processRecordId; + this.parameterSetName = parameterSetName; + this.invocationInfo = invocationInfo; + } + + public Task SendAsync(HttpRequestMessage request, CancellationToken token, Action cancel, SignalDelegate signal, NextDelegate next) + { + request.Headers.Add("x-ms-client-request-id", processRecordId); + request.Headers.Add("CommandName", invocationInfo?.InvocationName); + request.Headers.Add("FullCommandName", invocationInfo?.MyCommand?.Name); + request.Headers.Add("ParameterSetName", parameterSetName); + + // continue with pipeline. + return next(request, token, cancel, signal); + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/ConversionException.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/ConversionException.cs new file mode 100644 index 000000000000..c0f7c7e64fd7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/ConversionException.cs @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal class ConversionException : Exception + { + internal ConversionException(string message) + : base(message) { } + + internal ConversionException(JsonNode node, Type targetType) + : base($"Cannot convert '{node.Type}' to a {targetType.Name}") { } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/IJsonConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/IJsonConverter.cs new file mode 100644 index 000000000000..3d20d4b0d6e3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/IJsonConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal interface IJsonConverter + { + JsonNode ToJson(object value); + + object FromJson(JsonNode node); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/BinaryConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/BinaryConverter.cs new file mode 100644 index 000000000000..a278ffc98f56 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/BinaryConverter.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class BinaryConverter : JsonConverter + { + internal override JsonNode ToJson(byte[] value) => new XBinary(value); + + internal override byte[] FromJson(JsonNode node) + { + switch (node.Type) + { + case JsonType.String : return Convert.FromBase64String(node.ToString()); // Base64 Encoded + case JsonType.Binary : return ((XBinary)node).Value; + } + + throw new ConversionException(node, typeof(byte[])); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/BooleanConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/BooleanConverter.cs new file mode 100644 index 000000000000..edc222657e65 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/BooleanConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class BooleanConverter : JsonConverter + { + internal override JsonNode ToJson(bool value) => new JsonBoolean(value); + + internal override bool FromJson(JsonNode node) => (bool)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DateTimeConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DateTimeConverter.cs new file mode 100644 index 000000000000..863f35fc4d67 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DateTimeConverter.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class DateTimeConverter : JsonConverter + { + internal override JsonNode ToJson(DateTime value) + { + return new JsonDate(value); + } + + internal override DateTime FromJson(JsonNode node) => (DateTime)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs new file mode 100644 index 000000000000..5eb634af63a3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DateTimeOffsetConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class DateTimeOffsetConverter : JsonConverter + { + internal override JsonNode ToJson(DateTimeOffset value) => new JsonDate(value); + + internal override DateTimeOffset FromJson(JsonNode node) => (DateTimeOffset)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DecimalConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DecimalConverter.cs new file mode 100644 index 000000000000..efa64472132d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DecimalConverter.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class DecimalConverter : JsonConverter + { + internal override JsonNode ToJson(decimal value) => new JsonNumber(value.ToString()); + + internal override decimal FromJson(JsonNode node) + { + return (decimal)node; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DoubleConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DoubleConverter.cs new file mode 100644 index 000000000000..1a8334f8758d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/DoubleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class DoubleConverter : JsonConverter + { + internal override JsonNode ToJson(double value) => new JsonNumber(value); + + internal override double FromJson(JsonNode node) => (double)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/EnumConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/EnumConverter.cs new file mode 100644 index 000000000000..4e05705bb996 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/EnumConverter.cs @@ -0,0 +1,30 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class EnumConverter : IJsonConverter + { + private readonly Type type; + + internal EnumConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + } + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + + public object FromJson(JsonNode node) + { + if (node.Type == JsonType.Number) + { + return Enum.ToObject(type, (int)node); + } + + return Enum.Parse(type, node.ToString(), ignoreCase: true); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/GuidConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/GuidConverter.cs new file mode 100644 index 000000000000..0b61c61070ed --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/GuidConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class GuidConverter : JsonConverter + { + internal override JsonNode ToJson(Guid value) => new JsonString(value.ToString()); + + internal override Guid FromJson(JsonNode node) => (Guid)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/HashSet'1Converter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/HashSet'1Converter.cs new file mode 100644 index 000000000000..e60cc794281d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/HashSet'1Converter.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections.Generic; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class HashSetConverter : JsonConverter> + { + internal override JsonNode ToJson(HashSet value) + { + return new XSet(value); + } + + internal override HashSet FromJson(JsonNode node) + { + var collection = node as ICollection; + + if (collection.Count == 0) return null; + + // TODO: Remove Linq depedency + return new HashSet(collection.Cast()); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int16Converter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int16Converter.cs new file mode 100644 index 000000000000..d877c4fad9f0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class Int16Converter : JsonConverter + { + internal override JsonNode ToJson(short value) => new JsonNumber(value); + + internal override short FromJson(JsonNode node) => (short)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int32Converter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int32Converter.cs new file mode 100644 index 000000000000..f81f0f966db8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class Int32Converter : JsonConverter + { + internal override JsonNode ToJson(int value) => new JsonNumber(value); + + internal override int FromJson(JsonNode node) => (int)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int64Converter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int64Converter.cs new file mode 100644 index 000000000000..1fcd528c8240 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/Int64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class Int64Converter : JsonConverter + { + internal override JsonNode ToJson(long value) => new JsonNumber(value); + + internal override long FromJson(JsonNode node) => (long)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/JsonArrayConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/JsonArrayConverter.cs new file mode 100644 index 000000000000..62a8910b0e15 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/JsonArrayConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class JsonArrayConverter : JsonConverter + { + internal override JsonNode ToJson(JsonArray value) => value; + + internal override JsonArray FromJson(JsonNode node) => (JsonArray)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/JsonObjectConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/JsonObjectConverter.cs new file mode 100644 index 000000000000..bd5c986acc0b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/JsonObjectConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class JsonObjectConverter : JsonConverter + { + internal override JsonNode ToJson(JsonObject value) => value; + + internal override JsonObject FromJson(JsonNode node) => (JsonObject)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/SingleConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/SingleConverter.cs new file mode 100644 index 000000000000..446fff92869d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/SingleConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class SingleConverter : JsonConverter + { + internal override JsonNode ToJson(float value) => new JsonNumber(value.ToString()); + + internal override float FromJson(JsonNode node) => (float)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/StringConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/StringConverter.cs new file mode 100644 index 000000000000..113cb722ac11 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/StringConverter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class StringConverter : JsonConverter + { + internal override JsonNode ToJson(string value) => new JsonString(value); + + internal override string FromJson(JsonNode node) => node.ToString(); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/TimeSpanConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/TimeSpanConverter.cs new file mode 100644 index 000000000000..ab60a9c8a186 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/TimeSpanConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class TimeSpanConverter : JsonConverter + { + internal override JsonNode ToJson(TimeSpan value) => new JsonString(value.ToString()); + + internal override TimeSpan FromJson(JsonNode node) => (TimeSpan)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt16Converter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt16Converter.cs new file mode 100644 index 000000000000..5ca474a841a0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt16Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class UInt16Converter : JsonConverter + { + internal override JsonNode ToJson(ushort value) => new JsonNumber(value); + + internal override ushort FromJson(JsonNode node) => (ushort)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt32Converter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt32Converter.cs new file mode 100644 index 000000000000..a755cba0635c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt32Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class UInt32Converter : JsonConverter + { + internal override JsonNode ToJson(uint value) => new JsonNumber(value); + + internal override uint FromJson(JsonNode node) => (uint)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt64Converter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt64Converter.cs new file mode 100644 index 000000000000..3d29e8bf2846 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UInt64Converter.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class UInt64Converter : JsonConverter + { + internal override JsonNode ToJson(ulong value) => new JsonNumber(value.ToString()); + + internal override ulong FromJson(JsonNode node) => (ulong)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UriConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UriConverter.cs new file mode 100644 index 000000000000..8ef7ec0a8c5f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/Instances/UriConverter.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class UriConverter : JsonConverter + { + internal override JsonNode ToJson(Uri value) => new JsonString(value.AbsoluteUri); + + internal override Uri FromJson(JsonNode node) => (Uri)node; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverter.cs new file mode 100644 index 000000000000..acbfbbad5a1d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverter.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public abstract class JsonConverter : IJsonConverter + { + internal abstract T FromJson(JsonNode node); + + internal abstract JsonNode ToJson(T value); + + #region IConverter + + object IJsonConverter.FromJson(JsonNode node) => FromJson(node); + + JsonNode IJsonConverter.ToJson(object value) => ToJson((T)value); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverterAttribute.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverterAttribute.cs new file mode 100644 index 000000000000..fa5150a2fdfe --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverterAttribute.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class JsonConverterAttribute : Attribute + { + internal JsonConverterAttribute(Type type) + { + Converter = (IJsonConverter)Activator.CreateInstance(type); + } + + internal IJsonConverter Converter { get; } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverterFactory.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverterFactory.cs new file mode 100644 index 000000000000..3dd0085002aa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/JsonConverterFactory.cs @@ -0,0 +1,91 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class JsonConverterFactory + { + private static readonly Dictionary converters = new Dictionary(); + + static JsonConverterFactory() + { + AddInternal(new BooleanConverter()); + AddInternal(new DateTimeConverter()); + AddInternal(new DateTimeOffsetConverter()); + AddInternal(new BinaryConverter()); + AddInternal(new DecimalConverter()); + AddInternal(new DoubleConverter()); + AddInternal(new GuidConverter()); + AddInternal(new Int16Converter()); + AddInternal(new Int32Converter()); + AddInternal(new Int64Converter()); + AddInternal(new SingleConverter()); + AddInternal(new StringConverter()); + AddInternal(new TimeSpanConverter()); + AddInternal(new UInt16Converter()); + AddInternal(new UInt32Converter()); + AddInternal(new UInt64Converter()); + AddInternal(new UriConverter()); + + // Hash sets + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + AddInternal(new HashSetConverter()); + + // JSON + + AddInternal(new JsonObjectConverter()); + AddInternal(new JsonArrayConverter()); + } + + internal static Dictionary Instances => converters; + + internal static IJsonConverter Get(Type type) + { + var details = TypeDetails.Get(type); + + if (details.JsonConverter == null) + { + throw new ConversionException($"No converter found for '{type.Name}'."); + } + + return details.JsonConverter; + } + + internal static bool TryGet(Type type, out IJsonConverter converter) + { + var typeDetails = TypeDetails.Get(type); + + converter = typeDetails.JsonConverter; + + return converter != null; + } + + private static void AddInternal(JsonConverter converter) + => converters.Add(typeof(T), converter); + + private static void AddInternal(IJsonConverter converter) + => converters.Add(typeof(T), converter); + + internal static void Add(JsonConverter converter) + { + if (converter == null) + { + throw new ArgumentNullException(nameof(converter)); + } + + AddInternal(converter); + + var type = TypeDetails.Get(); + + type.JsonConverter = converter; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/StringLikeConverter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/StringLikeConverter.cs new file mode 100644 index 000000000000..098e0b086e4b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Conversions/StringLikeConverter.cs @@ -0,0 +1,45 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class StringLikeConverter : IJsonConverter + { + private readonly Type type; + private readonly MethodInfo parseMethod; + + internal StringLikeConverter(Type type) + { + this.type = type ?? throw new ArgumentNullException(nameof(type)); + this.parseMethod = StringLikeHelper.GetParseMethod(type); + } + + public object FromJson(JsonNode node) => + parseMethod.Invoke(null, new[] { node.ToString() }); + + public JsonNode ToJson(object value) => new JsonString(value.ToString()); + } + + internal static class StringLikeHelper + { + private static readonly Type[] parseMethodParamaterTypes = new[] { typeof(string) }; + + internal static bool IsStringLike(Type type) + { + return GetParseMethod(type) != null; + } + + internal static MethodInfo GetParseMethod(Type type) + { + MethodInfo method = type.GetMethod("Parse", parseMethodParamaterTypes); + + if (method?.IsPublic != true) return null; + + return method; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/IJsonSerializable.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/IJsonSerializable.cs new file mode 100644 index 000000000000..97187b93fb01 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/IJsonSerializable.cs @@ -0,0 +1,263 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json; +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + public interface IJsonSerializable + { + JsonNode ToJson(JsonObject container = null, SerializationMode serializationMode = SerializationMode.None); + } + internal static class JsonSerializable + { + /// + /// Serializes an enumerable and returns a JsonNode. + /// + /// an IEnumerable collection of items + /// A JsonNode that contains the collection of items serialized. + private static JsonNode ToJsonValue(System.Collections.IEnumerable enumerable) + { + if (enumerable != null) + { + // is it a byte array of some kind? + if (enumerable is System.Collections.Generic.IEnumerable byteEnumerable) + { + return new XBinary(System.Linq.Enumerable.ToArray(byteEnumerable)); + } + + var hasValues = false; + // just create an array of value nodes. + var result = new XNodeArray(); + foreach (var each in enumerable) + { + // we had at least one value. + hasValues = true; + + // try to serialize it. + var node = ToJsonValue(each); + if (null != node) + { + result.Add(node); + } + } + + // if we were able to add values, (or it was just empty), return it. + if (result.Count > 0 || !hasValues) + { + return result; + } + } + + // we couldn't serialize the values. Sorry. + return null; + } + + /// + /// Serializes a valuetype to a JsonNode. + /// + /// a ValueType (ie, a primitive, enum or struct) to be serialized + /// a JsonNode with the serialized value + private static JsonNode ToJsonValue(ValueType vValue) + { + // numeric type + if (vValue is SByte || vValue is Int16 || vValue is Int32 || vValue is Int64 || vValue is Byte || vValue is UInt16 || vValue is UInt32 || vValue is UInt64 || vValue is decimal || vValue is float || vValue is double) + { + return new JsonNumber(vValue.ToString()); + } + + // boolean type + if (vValue is bool bValue) + { + return new JsonBoolean(bValue); + } + + // dates + if (vValue is DateTime dtValue) + { + return new JsonDate(dtValue); + } + + // DictionaryEntity struct type + if (vValue is System.Collections.DictionaryEntry deValue) + { + return new JsonObject { { deValue.Key.ToString(), ToJsonValue(deValue.Value) } }; + } + + // sorry, no idea. + return null; + } + /// + /// Attempts to serialize an object by using ToJson() or ToJsonString() if they exist. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + private static JsonNode TryToJsonValue(dynamic oValue) + { + object jsonValue = null; + dynamic v = oValue; + try + { + jsonValue = v.ToJson().ToString(); + } + catch + { + // no harm... + try + { + jsonValue = v.ToJsonString().ToString(); + } + catch + { + // no worries here either. + } + } + + // if we got something out, let's use it. + if (null != jsonValue) + { + // JsonNumber is really a literal json value. Just don't try to cast that back to an actual number, ok? + return new JsonNumber(jsonValue.ToString()); + } + + return null; + } + + /// + /// Serialize an object by using a variety of methods. + /// + /// the object to be serialized. + /// the serialized JsonNode (if successful), otherwise, null + internal static JsonNode ToJsonValue(object value) + { + // things that implement our interface are preferred. + if (value is Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IJsonSerializable jsonSerializable) + { + return jsonSerializable.ToJson(); + } + + // strings are easy. + if (value is string || value is char) + { + return new JsonString(value.ToString()); + } + + // value types are fairly straightforward (fallback to ToJson()/ToJsonString() or literal JsonString ) + if (value is System.ValueType vValue) + { + return ToJsonValue(vValue) ?? TryToJsonValue(vValue) ?? new JsonString(vValue.ToString()); + } + + // dictionaries are objects that should be able to serialize + if (value is System.Collections.Generic.IDictionary dictionary) + { + return Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson(dictionary, null); + } + + // hashtables are converted to dictionaries for serialization + if (value is System.Collections.Hashtable hashtable) + { + var dict = new System.Collections.Generic.Dictionary(); + DictionaryExtensions.HashTableToDictionary(hashtable, dict); + return Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.ToJson(dict, null); + } + + // enumerable collections are handled like arrays (again, fallback to ToJson()/ToJsonString() or literal JsonString) + if (value is System.Collections.IEnumerable enumerableValue) + { + // some kind of enumerable value + return ToJsonValue(enumerableValue) ?? TryToJsonValue(value) ?? new JsonString(value.ToString()); + } + + // at this point, we're going to fallback to a string literal here, since we really have no idea what it is. + return new JsonString(value.ToString()); + } + + internal static JsonObject ToJson(System.Collections.Generic.Dictionary dictionary, JsonObject container) => ToJson((System.Collections.Generic.IDictionary)dictionary, container); + + /// + /// Serializes a dictionary into a JsonObject container. + /// + /// The dictionary to serailize + /// the container to serialize the dictionary into + /// the container + internal static JsonObject ToJson(System.Collections.Generic.IDictionary dictionary, JsonObject container) + { + container = container ?? new JsonObject(); + if (dictionary != null && dictionary.Count > 0) + { + foreach (var key in dictionary) + { + // currently, we don't serialize null values. + if (null != key.Value) + { + container.Add(key.Key, ToJsonValue(key.Value)); + continue; + } + } + } + return container; + } + + internal static Func> DeserializeDictionary(Func> dictionaryFactory) + { + return (node) => FromJson(node, dictionaryFactory(), (object)(DeserializeDictionary(dictionaryFactory)) as Func); + } + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.Dictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) => FromJson(json, (System.Collections.Generic.IDictionary)container, objectFactory, excludes); + + + internal static System.Collections.Generic.IDictionary FromJson(JsonObject json, System.Collections.Generic.IDictionary container, System.Func objectFactory, System.Collections.Generic.HashSet excludes = null) + { + if (null == json) + { + return container; + } + + foreach (var key in json.Keys) + { + if (true == excludes?.Contains(key)) + { + continue; + } + + var value = json[key]; + try + { + switch (value.Type) + { + case JsonType.Null: + // skip null values. + continue; + + case JsonType.Array: + case JsonType.Boolean: + case JsonType.Date: + case JsonType.Binary: + case JsonType.Number: + case JsonType.String: + container.Add(key, (V)value.ToValue()); + break; + case JsonType.Object: + if (objectFactory != null) + { + var v = objectFactory(value as JsonObject); + if (null != v) + { + container.Add(key, v); + } + } + break; + } + } + catch + { + } + } + return container; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonArray.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonArray.cs new file mode 100644 index 000000000000..8bc9906162b8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonArray.cs @@ -0,0 +1,13 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public partial class JsonArray + { + internal override object ToValue() => Count == 0 ? new object[0] : System.Linq.Enumerable.ToArray(System.Linq.Enumerable.Select(this, each => each.ToValue())); + } + + +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonBoolean.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonBoolean.cs new file mode 100644 index 000000000000..7d74e3852c5e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonBoolean.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal partial class JsonBoolean + { + internal static JsonBoolean Create(bool? value) => value is bool b ? new JsonBoolean(b) : null; + internal bool ToBoolean() => Value; + + internal override object ToValue() => Value; + } + + +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonNode.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonNode.cs new file mode 100644 index 000000000000..7f1f87e12612 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonNode.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonNode + { + /// + /// Returns the content of this node as the underlying value. + /// Will default to the string representation if not overridden in child classes. + /// + /// an object with the underlying value of the node. + internal virtual object ToValue() { + return this.ToString(); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonNumber.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonNumber.cs new file mode 100644 index 000000000000..9476f55d6614 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonNumber.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + using System; + + public partial class JsonNumber + { + internal static readonly DateTime EpochDate = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static long ToUnixTime(DateTime dateTime) + { + return (long)dateTime.Subtract(EpochDate).TotalSeconds; + } + private static DateTime FromUnixTime(long totalSeconds) + { + return EpochDate.AddSeconds(totalSeconds); + } + internal byte ToByte() => this; + internal int ToInt() => this; + internal long ToLong() => this; + internal short ToShort() => this; + internal UInt16 ToUInt16() => this; + internal UInt32 ToUInt32() => this; + internal UInt64 ToUInt64() => this; + internal decimal ToDecimal() => this; + internal double ToDouble() => this; + internal float ToFloat() => this; + + internal static JsonNumber Create(int? value) => value is int n ? new JsonNumber(n) : null; + internal static JsonNumber Create(long? value) => value is long n ? new JsonNumber(n) : null; + internal static JsonNumber Create(float? value) => value is float n ? new JsonNumber(n) : null; + internal static JsonNumber Create(double? value) => value is double n ? new JsonNumber(n) : null; + internal static JsonNumber Create(decimal? value) => value is decimal n ? new JsonNumber(n) : null; + internal static JsonNumber Create(DateTime? value) => value is DateTime date ? new JsonNumber(ToUnixTime(date)) : null; + + public static implicit operator DateTime(JsonNumber number) => FromUnixTime(number); + internal DateTime ToDateTime() => this; + + internal JsonNumber(decimal value) + { + this.value = value.ToString(); + } + internal override object ToValue() + { + if (IsInteger) + { + if (int.TryParse(this.value, out int iValue)) + { + return iValue; + } + if (long.TryParse(this.value, out long lValue)) + { + return lValue; + } + } + else + { + if (float.TryParse(this.value, out float fValue)) + { + return fValue; + } + if (double.TryParse(this.value, out double dValue)) + { + return dValue; + } + if (decimal.TryParse(this.value, out decimal dcValue)) + { + return dcValue; + } + } + return null; + } + } + + +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonObject.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonObject.cs new file mode 100644 index 000000000000..c30af2196e79 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonObject.cs @@ -0,0 +1,183 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + using System; + using System.Collections.Generic; + + public partial class JsonObject + { + internal override object ToValue() => Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.JsonSerializable.FromJson(this, new System.Collections.Generic.Dictionary(), (obj) => obj.ToValue()); + + internal void SafeAdd(string name, Func valueFn) + { + if (valueFn != null) + { + var value = valueFn(); + if (null != value) + { + items.Add(name, value); + } + } + } + + internal void SafeAdd(string name, JsonNode value) + { + if (null != value) + { + items.Add(name, value); + } + } + + internal T NullableProperty(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; + } + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + //throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal JsonObject Property(string propertyName) + { + return PropertyT(propertyName); + } + + internal T PropertyT(string propertyName) where T : JsonNode + { + if (this.TryGetValue(propertyName, out JsonNode value)) + { + if (value.IsNull) + { + return null; // we're going to assume that the consumer knows what to do if null is explicity returned? + } + + if (value is T tval) + { + return tval; + } + /* it's present, but not the correct type... */ + // throw new Exception($"Property {propertyName} in object expected type {typeof(T).Name} but value of type {value.Type.ToString()} was found."); + } + return null; + } + + internal int NumberProperty(string propertyName, ref int output) => output = this.PropertyT(propertyName)?.ToInt() ?? output; + internal float NumberProperty(string propertyName, ref float output) => output = this.PropertyT(propertyName)?.ToFloat() ?? output; + internal byte NumberProperty(string propertyName, ref byte output) => output = this.PropertyT(propertyName)?.ToByte() ?? output; + internal long NumberProperty(string propertyName, ref long output) => output = this.PropertyT(propertyName)?.ToLong() ?? output; + internal double NumberProperty(string propertyName, ref double output) => output = this.PropertyT(propertyName)?.ToDouble() ?? output; + internal decimal NumberProperty(string propertyName, ref decimal output) => output = this.PropertyT(propertyName)?.ToDecimal() ?? output; + internal short NumberProperty(string propertyName, ref short output) => output = this.PropertyT(propertyName)?.ToShort() ?? output; + internal DateTime NumberProperty(string propertyName, ref DateTime output) => output = this.PropertyT(propertyName)?.ToDateTime() ?? output; + + internal int? NumberProperty(string propertyName, ref int? output) => output = this.NullableProperty(propertyName)?.ToInt() ?? null; + internal float? NumberProperty(string propertyName, ref float? output) => output = this.NullableProperty(propertyName)?.ToFloat() ?? null; + internal byte? NumberProperty(string propertyName, ref byte? output) => output = this.NullableProperty(propertyName)?.ToByte() ?? null; + internal long? NumberProperty(string propertyName, ref long? output) => output = this.NullableProperty(propertyName)?.ToLong() ?? null; + internal double? NumberProperty(string propertyName, ref double? output) => output = this.NullableProperty(propertyName)?.ToDouble() ?? null; + internal decimal? NumberProperty(string propertyName, ref decimal? output) => output = this.NullableProperty(propertyName)?.ToDecimal() ?? null; + internal short? NumberProperty(string propertyName, ref short? output) => output = this.NullableProperty(propertyName)?.ToShort() ?? null; + + internal DateTime? NumberProperty(string propertyName, ref DateTime? output) => output = this.NullableProperty(propertyName)?.ToDateTime() ?? null; + + + internal string StringProperty(string propertyName) => this.PropertyT(propertyName)?.ToString(); + internal string StringProperty(string propertyName, ref string output) => output = this.PropertyT(propertyName)?.ToString() ?? output; + internal char StringProperty(string propertyName, ref char output) => output = this.PropertyT(propertyName)?.ToChar() ?? output; + internal char? StringProperty(string propertyName, ref char? output) => output = this.PropertyT(propertyName)?.ToChar() ?? null; + + internal DateTime StringProperty(string propertyName, ref DateTime output) => DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out output) ? output : output; + internal DateTime? StringProperty(string propertyName, ref DateTime? output) => output = DateTime.TryParse(this.PropertyT(propertyName)?.ToString(), out var o) ? o : output; + + + internal bool BooleanProperty(string propertyName, ref bool output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? output; + internal bool? BooleanProperty(string propertyName, ref bool? output) => output = this.PropertyT(propertyName)?.ToBoolean() ?? null; + + internal T[] ArrayProperty(string propertyName, ref T[] output, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + } + return output; + } + internal T[] ArrayProperty(string propertyName, Func deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + var output = new T[array.Count]; + for (var i = 0; i < output.Length; i++) + { + output[i] = deserializer(array[i]); + } + return output; + } + return new T[0]; + } + internal void IterateArrayProperty(string propertyName, Action deserializer) + { + var array = this.PropertyT(propertyName); + if (array != null) + { + for (var i = 0; i < array.Count; i++) + { + deserializer(array[i]); + } + } + } + + internal Dictionary DictionaryProperty(string propertyName, ref Dictionary output, Func deserializer) + { + var dictionary = this.PropertyT(propertyName); + if (output == null) + { + output = new Dictionary(); + } + else + { + output.Clear(); + } + if (dictionary != null) + { + foreach (var key in dictionary.Keys) + { + output[key] = deserializer(dictionary[key]); + } + } + return output; + } + + internal static JsonObject Create(IDictionary source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new JsonObject(); + + foreach (var key in source.Keys) + { + result.SafeAdd(key, selector(source[key])); + } + return result; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonString.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonString.cs new file mode 100644 index 000000000000..d218f40fb521 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/JsonString.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + using System; + using System.Globalization; + using System.Linq; + + public partial class JsonString + { + internal static string DateFormat = "yyyy-MM-dd"; + internal static string DateTimeFormat = "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK"; + internal static string DateTimeRfc1123Format = "R"; + + internal static JsonString Create(string value) => value == null ? null : new JsonString(value); + internal static JsonString Create(char? value) => value is char c ? new JsonString(c.ToString()) : null; + + internal static JsonString CreateDate(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTime(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeFormat, CultureInfo.CurrentCulture)) : null; + internal static JsonString CreateDateTimeRfc1123(DateTime? value) => value is DateTime date ? new JsonString(date.ToString(DateTimeRfc1123Format, CultureInfo.CurrentCulture)) : null; + + internal char ToChar() => this.Value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char(JsonString value) => value?.ToString()?.FirstOrDefault() ?? default(char); + public static implicit operator char? (JsonString value) => value?.ToString()?.FirstOrDefault(); + + public static implicit operator DateTime(JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime); + public static implicit operator DateTime? (JsonString value) => DateTime.TryParse(value, out var output) ? output : default(DateTime?); + + } + + +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/XNodeArray.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/XNodeArray.cs new file mode 100644 index 000000000000..2263ed792544 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Customizations/XNodeArray.cs @@ -0,0 +1,44 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + using System; + using System.Linq; + + public partial class XNodeArray + { + internal static XNodeArray Create(T[] source, Func selector) + { + if (source == null || selector == null) + { + return null; + } + var result = new XNodeArray(); + foreach (var item in source.Select(selector)) + { + result.SafeAdd(item); + } + return result; + } + internal void SafeAdd(JsonNode item) + { + if (item != null) + { + items.Add(item); + } + } + internal void SafeAdd(Func itemFn) + { + if (itemFn != null) + { + var item = itemFn(); + if (item != null) + { + items.Add(item); + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Debugging.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Debugging.cs new file mode 100644 index 000000000000..8277982245ec --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Debugging.cs @@ -0,0 +1,28 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + internal static class AttachDebugger + { + internal static void Break() + { + while (!System.Diagnostics.Debugger.IsAttached) + { + System.Console.Error.WriteLine($"Waiting for debugger to attach to process {System.Diagnostics.Process.GetCurrentProcess().Id}"); + for (int i = 0; i < 50; i++) + { + if (System.Diagnostics.Debugger.IsAttached) + { + break; + } + System.Threading.Thread.Sleep(100); + System.Console.Error.Write("."); + } + System.Console.Error.WriteLine(); + } + System.Diagnostics.Debugger.Break(); + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/DictionaryExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/DictionaryExtensions.cs new file mode 100644 index 000000000000..1e00d81cb7c2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/DictionaryExtensions.cs @@ -0,0 +1,33 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + internal static class DictionaryExtensions + { + internal static void HashTableToDictionary(System.Collections.Hashtable hashtable, System.Collections.Generic.IDictionary dictionary) + { + if (null == hashtable) + { + return; + } + foreach (var each in hashtable.Keys) + { + var key = each.ToString(); + var value = hashtable[key]; + if (null != value) + { + try + { + dictionary[key] = (V)value; + } + catch + { + // Values getting dropped; not compatible with target dictionary. Not sure what to do here. + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/EventData.cs b/swaggerci/oracle.DefaultTag/generated/runtime/EventData.cs new file mode 100644 index 000000000000..8a4f2bbfd86b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/EventData.cs @@ -0,0 +1,78 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + + using System; + using System.Threading; + + ///Represents the data in signaled event. + public partial class EventData + { + /// + /// The type of the event being signaled + /// + public string Id; + + /// + /// The user-ready message from the event. + /// + public string Message; + + /// + /// When the event is about a parameter, this is the parameter name. + /// Used in Validation Events + /// + public string Parameter; + + /// + /// This represents a numeric value associated with the event. + /// Use for progress-style events + /// + public double Value; + + /// + /// Any extended data for an event should be serialized and stored here. + /// + public string ExtendedData; + + /// + /// If the event triggers after the request message has been created, this will contain the Request Message (which in HTTP calls would be HttpRequestMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.RequestMessgae is HttpRequestMessage httpRequest) + /// { + /// httpRequest.Headers.Add("x-request-flavor", "vanilla"); + /// } + /// + /// + public object RequestMessage; + + /// + /// If the event triggers after the response is back, this will contain the Response Message (which in HTTP calls would be HttpResponseMessage) + /// + /// Typically you'd cast this to the expected type to use it: + /// + /// if(eventData.ResponseMessage is HttpResponseMessage httpResponse){ + /// var flavor = httpResponse.Headers.GetValue("x-request-flavor"); + /// } + /// + /// + public object ResponseMessage; + + /// + /// Cancellation method for this event. + /// + /// If the event consumer wishes to cancel the request that initiated this event, call Cancel() + /// + /// + /// The original initiator of the request must provide the implementation of this. + /// + public System.Action Cancel; + } + +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/EventDataExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/EventDataExtensions.cs new file mode 100644 index 000000000000..d2e48bff99ed --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/EventDataExtensions.cs @@ -0,0 +1,94 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System; + + /// + /// PowerShell-specific data on top of the llc# EventData + /// + /// + /// In PowerShell, we add on the EventDataConverter to support sending events between modules. + /// Obviously, this code would need to be duplcated on both modules. + /// This is preferable to sharing a common library, as versioning makes that problematic. + /// + [System.ComponentModel.TypeConverter(typeof(EventDataConverter))] + public partial class EventData : EventArgs + { + } + + /// + /// A PowerShell PSTypeConverter to adapt an EventData object that has been passed. + /// Usually used between modules. + /// + public class EventDataConverter : System.Management.Automation.PSTypeConverter + { + public override bool CanConvertTo(object sourceValue, Type destinationType) => false; + public override object ConvertTo(object sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => null; + public override bool CanConvertFrom(dynamic sourceValue, Type destinationType) => destinationType == typeof(EventData) && CanConvertFrom(sourceValue); + public override object ConvertFrom(dynamic sourceValue, Type destinationType, IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Verifies that a given object has the required members to convert it to the target type (EventData) + /// + /// Uses a dynamic type so that it is able to use the simplest code without excessive checking. + /// + /// The instance to verify + /// True, if the object has all the required parameters. + public static bool CanConvertFrom(dynamic sourceValue) + { + try + { + // check if this has *required* parameters... + sourceValue?.Id?.GetType(); + sourceValue?.Message?.GetType(); + sourceValue?.Cancel?.GetType(); + + // remaining parameters are not *required*, + // and if they have values, it will copy them at conversion time. + } + catch + { + // if anything throws an exception (because it's null, or doesn't have that member) + return false; + } + return true; + } + + /// + /// Returns result of the delegate as the expected type, or default(T) + /// + /// This isolates any exceptions from the consumer. + /// + /// A delegate that returns a value + /// The desired output type + /// The value from the function if the type is correct + private static T To(Func srcValue) + { + try { return srcValue(); } + catch { return default(T); } + } + + /// + /// Converts an incoming object to the expected type by treating the incoming object as a dynamic, and coping the expected values. + /// + /// the incoming object + /// EventData + public static EventData ConvertFrom(dynamic sourceValue) + { + return new EventData + { + Id = To(() => sourceValue.Id), + Message = To(() => sourceValue.Message), + Parameter = To(() => sourceValue.Parameter), + Value = To(() => sourceValue.Value), + RequestMessage = To(() => sourceValue.RequestMessage), + ResponseMessage = To(() => sourceValue.ResponseMessage), + Cancel = To(() => sourceValue.Cancel) + }; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/EventListener.cs b/swaggerci/oracle.DefaultTag/generated/runtime/EventListener.cs new file mode 100644 index 000000000000..1abf141356eb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/EventListener.cs @@ -0,0 +1,247 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + + using System; + using System.Linq; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData = System.Func; + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public interface IValidates + { + Task Validate(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IEventListener listener); + } + + /// + /// The IEventListener Interface defines the communication mechanism for Signaling events during a remote call. + /// + /// + /// The interface is designed to be as minimal as possible, allow for quick peeking of the event type (id) + /// and the cancellation status and provides a delegate for retrieving the event details themselves. + /// + public interface IEventListener + { + Task Signal(string id, CancellationToken token, GetEventData createMessage); + CancellationToken Token { get; } + System.Action Cancel { get; } + } + + internal static partial class Extensions + { + public static Task Signal(this IEventListener instance, string id, CancellationToken token, Func createMessage) => instance.Signal(id, token, createMessage); + public static Task Signal(this IEventListener instance, string id, CancellationToken token) => instance.Signal(id, token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, HttpResponseMessage response) => instance.Signal(id, token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, CancellationToken token, EventData message) => instance.Signal(id, token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, Func createMessage) => instance.Signal(id, instance.Token, createMessage); + public static Task Signal(this IEventListener instance, string id) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = request, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, string messageText, double magnitude, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = messageText, RequestMessage = response.RequestMessage, ResponseMessage = response, Value = magnitude, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpRequestMessage request, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = request, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, HttpResponseMessage response) => instance.Signal(id, instance.Token, () => new EventData { Id = id, RequestMessage = response.RequestMessage, ResponseMessage = response, Cancel = instance.Cancel }); + public static Task Signal(this IEventListener instance, string id, EventData message) => instance.Signal(id, instance.Token, () => { message.Id = id; message.Cancel = instance.Cancel; return message; }); + + public static Task Signal(this IEventListener instance, string id, System.Uri uri) => instance.Signal(id, instance.Token, () => new EventData { Id = id, Message = uri.ToString(), Cancel = instance.Cancel }); + + public static async Task AssertNotNull(this IEventListener instance, string parameterName, object value) + { + if (value == null) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' should not be null", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMinimumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length < length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is less than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertMaximumLength(this IEventListener instance, string parameterName, string value, int length) + { + if (value != null && value.Length > length) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Length of '{parameterName}' is greater than {length}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + + public static async Task AssertRegEx(this IEventListener instance, string parameterName, string value, string regularExpression) + { + if (value != null && !System.Text.RegularExpressions.Regex.Match(value, regularExpression).Success) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' does not validate against pattern /{regularExpression}/", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertEnum(this IEventListener instance, string parameterName, string value, params string[] values) + { + if (!values.Any(each => each.Equals(value))) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"'{parameterName}' is not one of ({values.Aggregate((c, e) => $"'{e}',{c}")}", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertObjectIsValid(this IEventListener instance, string parameterName, object inst) + { + await (inst as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.IValidates)?.Validate(instance); + } + + public static async Task AssertIsLessThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) >= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThan(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) <= 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsLessThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) > 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be less than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsGreaterThanOrEqual(this IEventListener instance, string parameterName, T? value, T max) where T : struct, System.IComparable + { + if (null != value && ((T)value).CompareTo(max) < 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be greater than or equal to {max} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, Int64? value, Int64 multiple) + { + if (null != value && value % multiple != 0) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, double? value, double multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + public static async Task AssertIsMultipleOf(this IEventListener instance, string parameterName, decimal? value, decimal multiple) + { + if (null != value) + { + var i = (Int64)(value / multiple); + if (i != value / multiple) + { + await instance.Signal(Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, instance.Token, () => new EventData { Id = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Events.ValidationWarning, Message = $"Value of '{parameterName}' must be multiple of {multiple} (value is {value})", Parameter = parameterName, Cancel = instance.Cancel }); + } + } + } + } + + /// + /// An Implementation of the IEventListener that supports subscribing to events and dispatching them + /// (used for manually using the lowlevel interface) + /// + public class EventListener : CancellationTokenSource, IEnumerable>, IEventListener + { + private Dictionary calls = new Dictionary(); + public IEnumerator> GetEnumerator() => calls.GetEnumerator(); + IEnumerator IEnumerable.GetEnumerator() => calls.GetEnumerator(); + public EventListener() + { + } + + public new Action Cancel => base.Cancel; + private Event tracer; + + public EventListener(params (string name, Event callback)[] initializer) + { + foreach (var each in initializer) + { + Add(each.name, each.callback); + } + } + + public void Add(string name, SynchEvent callback) + { + Add(name, (message) => { callback(message); return Task.CompletedTask; }); + } + + public void Add(string name, Event callback) + { + if (callback != null) + { + if (string.IsNullOrEmpty(name)) + { + if (calls.ContainsKey(name)) + { + tracer += callback; + } + else + { + tracer = callback; + } + } + else + { + if (calls.ContainsKey(name)) + { + calls[name ?? System.String.Empty] += callback; + } + else + { + calls[name ?? System.String.Empty] = callback; + } + } + } + } + + + public async Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + using (NoSynchronizationContext) + { + if (!string.IsNullOrEmpty(id) && (calls.TryGetValue(id, out Event listener) || tracer != null)) + { + var message = createMessage(); + message.Id = id; + + await listener?.Invoke(message); + await tracer?.Invoke(message); + + if (token.IsCancellationRequested) + { + throw new OperationCanceledException($"Canceled by event {id} ", this.Token); + } + } + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Events.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Events.cs new file mode 100644 index 000000000000..f8f94c7a8302 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Events.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + public static partial class Events + { + public const string Log = nameof(Log); + public const string Validation = nameof(Validation); + public const string ValidationWarning = nameof(ValidationWarning); + public const string AfterValidation = nameof(AfterValidation); + public const string RequestCreated = nameof(RequestCreated); + public const string ResponseCreated = nameof(ResponseCreated); + public const string URLCreated = nameof(URLCreated); + public const string Finally = nameof(Finally); + public const string HeaderParametersAdded = nameof(HeaderParametersAdded); + public const string BodyContentSet = nameof(BodyContentSet); + public const string BeforeCall = nameof(BeforeCall); + public const string BeforeResponseDispatch = nameof(BeforeResponseDispatch); + public const string FollowingNextLink = nameof(FollowingNextLink); + public const string DelayBeforePolling = nameof(DelayBeforePolling); + public const string Polling = nameof(Polling); + + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/EventsExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/EventsExtensions.cs new file mode 100644 index 000000000000..6a18ac52c69a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/EventsExtensions.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + public static partial class Events + { + public const string CmdletProcessRecordStart = nameof(CmdletProcessRecordStart); + public const string CmdletProcessRecordAsyncStart = nameof(CmdletProcessRecordAsyncStart); + public const string CmdletException = nameof(CmdletException); + public const string CmdletGetPipeline = nameof(CmdletGetPipeline); + public const string CmdletBeforeAPICall = nameof(CmdletBeforeAPICall); + public const string CmdletBeginProcessing = nameof(CmdletBeginProcessing); + public const string CmdletEndProcessing = nameof(CmdletEndProcessing); + public const string CmdletProcessRecordEnd = nameof(CmdletProcessRecordEnd); + public const string CmdletProcessRecordAsyncEnd = nameof(CmdletProcessRecordAsyncEnd); + public const string CmdletAfterAPICall = nameof(CmdletAfterAPICall); + + public const string Verbose = nameof(Verbose); + public const string Debug = nameof(Debug); + public const string Information = nameof(Information); + public const string Error = nameof(Error); + public const string Warning = nameof(Warning); + } + +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Extensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Extensions.cs new file mode 100644 index 000000000000..ccaa7c9e151f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Extensions.cs @@ -0,0 +1,117 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System.Linq; + using System; + + internal static partial class Extensions + { + public static T[] SubArray(this T[] array, int offset, int length) + { + return new ArraySegment(array, offset, length) + .ToArray(); + } + + public static T ReadHeaders(this T instance, global::System.Net.Http.Headers.HttpResponseHeaders headers) where T : class + { + (instance as IHeaderSerializable)?.ReadHeaders(headers); + return instance; + } + + internal static bool If(T input, out T output) + { + if (null == input) + { + output = default(T); + return false; + } + output = input; + return true; + } + + internal static void AddIf(T value, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(value); + } + } + + internal static void AddIf(T value, string serializedName, System.Action addMethod) + { + // if value is present (and it's not just an empty JSON Object) + if (null != value && (value as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject)?.Keys.Count != 0) + { + addMethod(serializedName, value); + } + } + + /// + /// Returns the first header value as a string from an HttpReponseMessage. + /// + /// the HttpResponseMessage to fetch a header from + /// the header name + /// the first header value as a string from an HttpReponseMessage. string.empty if there is no header value matching + internal static string GetFirstHeader(this System.Net.Http.HttpResponseMessage response, string headerName) => response.Headers.FirstOrDefault(each => string.Equals(headerName, each.Key, System.StringComparison.OrdinalIgnoreCase)).Value?.FirstOrDefault() ?? string.Empty; + + /// + /// Sets the Synchronization Context to null, and returns an IDisposable that when disposed, + /// will restore the synchonization context to the original value. + /// + /// This is used a less-invasive means to ensure that code in the library that doesn't + /// need to be continued in the original context doesn't have to have ConfigureAwait(false) + /// on every single await + /// + /// If the SynchronizationContext is null when this is used, the resulting IDisposable + /// will not do anything (this prevents excessive re-setting of the SynchronizationContext) + /// + /// Usage: + /// + /// using(NoSynchronizationContext) { + /// await SomeAsyncOperation(); + /// await SomeOtherOperation(); + /// } + /// + /// + /// + /// An IDisposable that will return the SynchronizationContext to original state + internal static System.IDisposable NoSynchronizationContext => System.Threading.SynchronizationContext.Current == null ? Dummy : new NoSyncContext(); + + /// + /// An instance of the Dummy IDispoable. + /// + /// + internal static System.IDisposable Dummy = new DummyDisposable(); + + /// + /// An IDisposable that does absolutely nothing. + /// + internal class DummyDisposable : System.IDisposable + { + public void Dispose() + { + } + } + /// + /// An IDisposable that saves the SynchronizationContext,sets it to null and + /// restores it to the original upon Dispose(). + /// + /// NOTE: This is designed to be less invasive than using .ConfigureAwait(false) + /// on every single await in library code (ie, places where we know we don't need + /// to continue in the same context as we went async) + /// + internal class NoSyncContext : System.IDisposable + { + private System.Threading.SynchronizationContext original = System.Threading.SynchronizationContext.Current; + internal NoSyncContext() + { + System.Threading.SynchronizationContext.SetSynchronizationContext(null); + } + public void Dispose() => System.Threading.SynchronizationContext.SetSynchronizationContext(original); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs new file mode 100644 index 000000000000..4772e86ea0d0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Extensions/StringBuilderExtensions.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal static class StringBuilderExtensions + { + /// + /// Extracts the buffered value and resets the buffer + /// + internal static string Extract(this StringBuilder builder) + { + var text = builder.ToString(); + + builder.Clear(); + + return text; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Extensions/TypeExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Extensions/TypeExtensions.cs new file mode 100644 index 000000000000..332ea9ac9d48 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Extensions/TypeExtensions.cs @@ -0,0 +1,61 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal static class TypeExtensions + { + internal static bool IsNullable(this Type type) => + type.IsGenericType && type.GetGenericTypeDefinition().Equals(typeof(Nullable<>)); + + internal static Type GetOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition() == openGenericInterfaceType) + { + return candidateType; + } + + // Check if it references it's own converter.... + + foreach (Type interfaceType in candidateType.GetInterfaces()) + { + if (interfaceType.IsGenericType + && interfaceType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return interfaceType; + } + } + + return null; + } + + // Author: Sebastian Good + // http://stackoverflow.com/questions/503263/how-to-determine-if-a-type-implements-a-specific-generic-interface-type + internal static bool ImplementsOpenGenericInterface(this Type candidateType, Type openGenericInterfaceType) + { + if (candidateType.Equals(openGenericInterfaceType)) + { + return true; + } + + if (candidateType.IsGenericType && candidateType.GetGenericTypeDefinition().Equals(openGenericInterfaceType)) + { + return true; + } + + foreach (Type i in candidateType.GetInterfaces()) + { + if (i.IsGenericType && i.ImplementsOpenGenericInterface(openGenericInterfaceType)) + { + return true; + } + } + + return false; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Seperator.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Seperator.cs new file mode 100644 index 000000000000..0b4ccbaba422 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/Seperator.cs @@ -0,0 +1,11 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal static class Seperator + { + internal static readonly char[] Dash = { '-' }; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/TypeDetails.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/TypeDetails.cs new file mode 100644 index 000000000000..dc97e9cd0541 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/TypeDetails.cs @@ -0,0 +1,116 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + + + + internal class TypeDetails + { + private readonly Type info; + + internal TypeDetails(Type info) + { + this.info = info ?? throw new ArgumentNullException(nameof(info)); + } + + internal Type NonNullType { get; set; } + + internal object DefaultValue { get; set; } + + internal bool IsNullable { get; set; } + + internal bool IsList { get; set; } + + internal bool IsStringLike { get; set; } + + internal bool IsEnum => info.IsEnum; + + internal bool IsArray => info.IsArray; + + internal bool IsValueType => info.IsValueType; + + internal Type ElementType { get; set; } + + internal IJsonConverter JsonConverter { get; set; } + + #region Creation + + private static readonly ConcurrentDictionary cache = new ConcurrentDictionary(); + + internal static TypeDetails Get() => Get(typeof(T)); + + internal static TypeDetails Get(Type type) => cache.GetOrAdd(type, Create); + + private static TypeDetails Create(Type type) + { + var isGenericList = !type.IsPrimitive && type.ImplementsOpenGenericInterface(typeof(IList<>)); + var isList = !type.IsPrimitive && (isGenericList || typeof(IList).IsAssignableFrom(type)); + + var isNullable = type.IsNullable(); + + Type elementType; + + if (type.IsArray) + { + elementType = type.GetElementType(); + } + else if (isGenericList) + { + var iList = type.GetOpenGenericInterface(typeof(IList<>)); + + elementType = iList.GetGenericArguments()[0]; + } + else + { + elementType = null; + } + + var nonNullType = isNullable ? type.GetGenericArguments()[0] : type; + + var isStringLike = false; + + IJsonConverter converter; + + var jsonConverterAttribute = type.GetCustomAttribute(); + + if (jsonConverterAttribute != null) + { + converter = jsonConverterAttribute.Converter; + } + else if (nonNullType.IsEnum) + { + converter = new EnumConverter(nonNullType); + } + else if (JsonConverterFactory.Instances.TryGetValue(nonNullType, out converter)) + { + } + else if (StringLikeHelper.IsStringLike(nonNullType)) + { + isStringLike = true; + + converter = new StringLikeConverter(nonNullType); + } + + return new TypeDetails(nonNullType) { + NonNullType = nonNullType, + DefaultValue = type.IsValueType ? Activator.CreateInstance(type) : null, + IsNullable = isNullable, + IsList = isList, + IsStringLike = isStringLike, + ElementType = elementType, + JsonConverter = converter + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/XHelper.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/XHelper.cs new file mode 100644 index 000000000000..3a4fe2d59e3e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Helpers/XHelper.cs @@ -0,0 +1,75 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal static class XHelper + { + internal static JsonNode Create(JsonType type, TypeCode code, object value) + { + switch (type) + { + case JsonType.Binary : return new XBinary((byte[])value); + case JsonType.Boolean : return new JsonBoolean((bool)value); + case JsonType.Number : return new JsonNumber(value.ToString()); + case JsonType.String : return new JsonString((string)value); + } + + throw new Exception($"JsonType '{type}' does not have a fast conversion"); + } + + internal static bool TryGetElementType(TypeCode code, out JsonType type) + { + switch (code) + { + case TypeCode.Boolean : type = JsonType.Boolean; return true; + case TypeCode.Byte : type = JsonType.Number; return true; + case TypeCode.DateTime : type = JsonType.Date; return true; + case TypeCode.Decimal : type = JsonType.Number; return true; + case TypeCode.Double : type = JsonType.Number; return true; + case TypeCode.Empty : type = JsonType.Null; return true; + case TypeCode.Int16 : type = JsonType.Number; return true; + case TypeCode.Int32 : type = JsonType.Number; return true; + case TypeCode.Int64 : type = JsonType.Number; return true; + case TypeCode.SByte : type = JsonType.Number; return true; + case TypeCode.Single : type = JsonType.Number; return true; + case TypeCode.String : type = JsonType.String; return true; + case TypeCode.UInt16 : type = JsonType.Number; return true; + case TypeCode.UInt32 : type = JsonType.Number; return true; + case TypeCode.UInt64 : type = JsonType.Number; return true; + } + + type = default; + + return false; + } + + internal static JsonType GetElementType(TypeCode code) + { + switch (code) + { + case TypeCode.Boolean : return JsonType.Boolean; + case TypeCode.Byte : return JsonType.Number; + case TypeCode.DateTime : return JsonType.Date; + case TypeCode.Decimal : return JsonType.Number; + case TypeCode.Double : return JsonType.Number; + case TypeCode.Empty : return JsonType.Null; + case TypeCode.Int16 : return JsonType.Number; + case TypeCode.Int32 : return JsonType.Number; + case TypeCode.Int64 : return JsonType.Number; + case TypeCode.SByte : return JsonType.Number; + case TypeCode.Single : return JsonType.Number; + case TypeCode.String : return JsonType.String; + case TypeCode.UInt16 : return JsonType.Number; + case TypeCode.UInt32 : return JsonType.Number; + case TypeCode.UInt64 : return JsonType.Number; + default : return JsonType.Object; + } + + throw new Exception($"TypeCode '{code}' does not have a fast converter"); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/HttpPipeline.cs b/swaggerci/oracle.DefaultTag/generated/runtime/HttpPipeline.cs new file mode 100644 index 000000000000..419fbaadd82d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/HttpPipeline.cs @@ -0,0 +1,88 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + using GetEventData = System.Func; + using NextDelegate = System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + + using SignalDelegate = System.Func, System.Threading.Tasks.Task>; + using GetParameterDelegate = System.Func, string, object>; + using SendAsyncStepDelegate = System.Func, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>; + using PipelineChangeDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>; + using ModuleLoadPipelineDelegate = System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + using NewRequestPipelineDelegate = System.Action, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>, System.Action, System.Threading.Tasks.Task>, System.Func, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>, System.Threading.Tasks.Task>>>; + +/* + public class DelegateBasedEventListener : IEventListener + { + private EventListenerDelegate _listener; + public DelegateBasedEventListener(EventListenerDelegate listener) + { + _listener = listener; + } + public CancellationToken Token => CancellationToken.None; + public System.Action Cancel => () => { }; + + + public Task Signal(string id, CancellationToken token, GetEventData createMessage) + { + return _listener(id, token, () => createMessage()); + } + } +*/ + /// + /// This is a necessary extension to the SendAsyncFactory to support the 'generic' delegate format. + /// + public partial class SendAsyncFactory + { + /// + /// This translates a generic-defined delegate for a listener into one that fits our ISendAsync pattern. + /// (Provided to support out-of-module delegation for Azure Cmdlets) + /// + /// The Pipeline Step as a delegate + public SendAsyncFactory(SendAsyncStepDelegate step) => this.implementation = (request, listener, next) => + step( + request, + listener.Token, + listener.Cancel, + (id, token, getEventData) => listener.Signal(id, token, () => { + var data = EventDataConverter.ConvertFrom( getEventData() ) as EventData; + data.Id = id; + data.Cancel = listener.Cancel; + data.RequestMessage = request; + return data; + }), + (req, token, cancel, listenerDelegate) => next.SendAsync(req, listener)); + } + + public partial class HttpPipeline : ISendAsync + { + public HttpPipeline Append(SendAsyncStepDelegate item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStepDelegate item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/HttpPipelineMocking.ps1 b/swaggerci/oracle.DefaultTag/generated/runtime/HttpPipelineMocking.ps1 new file mode 100644 index 000000000000..0b160d88a272 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/HttpPipelineMocking.ps1 @@ -0,0 +1,110 @@ +$ErrorActionPreference = "Stop" + +# get the recording path +if (-not $TestRecordingFile) { + $TestRecordingFile = Join-Path $PSScriptRoot 'recording.json' +} + +# create the Http Pipeline Recorder +$Mock = New-Object -Type Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PipelineMock $TestRecordingFile + +# set the recorder to the appropriate mode (default to 'live') +Write-Host -ForegroundColor Green "Running '$TestMode' mode..." +switch ($TestMode) { + 'record' { + Write-Host -ForegroundColor Green "Recording to $TestRecordingFile" + $Mock.SetRecord() + $null = erase -ea 0 $TestRecordingFile + } + 'playback' { + if (-not (Test-Path $TestRecordingFile)) { + Write-Host -fore:yellow "Recording file '$TestRecordingFile' is not present. Tests expecting recorded responses will fail" + } else { + Write-Host -ForegroundColor Green "Using recording $TestRecordingFile" + } + $Mock.SetPlayback() + $Mock.ForceResponseHeaders["Retry-After"] = "0"; + } + default: { + $Mock.SetLive() + } +} + +# overrides for Pester Describe/Context/It + +function Describe( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushDescription($Name) + try { + return pester\Describe -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopDescription() + } +} + +function Context( + [Parameter(Mandatory = $true, Position = 0)] + [string] $Name, + + [Alias('Tags')] + [string[]] $Tag = @(), + + [Parameter(Position = 1)] + [ValidateNotNull()] + [ScriptBlock] $Fixture = $(Throw "No test script block is provided. (Have you put the open curly brace on the next line?)") +) { + $Mock.PushContext($Name) + try { + return pester\Context -Name $Name -Tag $Tag -Fixture $fixture + } + finally { + $Mock.PopContext() + } +} + +function It { + [CmdletBinding(DefaultParameterSetName = 'Normal')] + param( + [Parameter(Mandatory = $true, Position = 0)] + [string]$Name, + + [Parameter(Position = 1)] + [ScriptBlock] $Test = { }, + + [System.Collections.IDictionary[]] $TestCases, + + [Parameter(ParameterSetName = 'Pending')] + [Switch] $Pending, + + [Parameter(ParameterSetName = 'Skip')] + [Alias('Ignore')] + [Switch] $Skip + ) + $Mock.PushScenario($Name) + + try { + if ($skip) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Skip + } + if ($pending) { + return pester\It -Name $Name -Test $Test -TestCases $TestCases -Pending + } + return pester\It -Name $Name -Test $Test -TestCases $TestCases + } + finally { + $null = $Mock.PopScenario() + } +} + +# set the HttpPipelineAppend for all the cmdlets +$PSDefaultParameterValues["*:HttpPipelinePrepend"] = $Mock diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/IAssociativeArray.cs b/swaggerci/oracle.DefaultTag/generated/runtime/IAssociativeArray.cs new file mode 100644 index 000000000000..22b8435631c3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/IAssociativeArray.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +#define DICT_PROPERTIES +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + /// A subset of IDictionary that doesn't implement IEnumerable or IDictionary to work around PowerShell's aggressive formatter + public interface IAssociativeArray + { +#if DICT_PROPERTIES + System.Collections.Generic.IEnumerable Keys { get; } + System.Collections.Generic.IEnumerable Values { get; } + int Count { get; } +#endif + System.Collections.Generic.IDictionary AdditionalProperties { get; } + T this[string index] { get; set; } + void Add(string key, T value); + bool ContainsKey(string key); + bool Remove(string key); + bool TryGetValue(string key, out T value); + void Clear(); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/IHeaderSerializable.cs b/swaggerci/oracle.DefaultTag/generated/runtime/IHeaderSerializable.cs new file mode 100644 index 000000000000..16cdd4ecc708 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/IHeaderSerializable.cs @@ -0,0 +1,14 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + public interface IHeaderSerializable + { + void ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/ISendAsync.cs b/swaggerci/oracle.DefaultTag/generated/runtime/ISendAsync.cs new file mode 100644 index 000000000000..b0d341bbe465 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/ISendAsync.cs @@ -0,0 +1,300 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System.Net.Http; + using System.Collections.Generic; + using System.Threading; + using System.Threading.Tasks; + using System.Collections; + using System.Linq; + + /// + /// The interface for sending an HTTP request across the wire. + /// + public interface ISendAsync + { + Task SendAsync(HttpRequestMessage request, IEventListener callback); + } + + public class SendAsyncTerminalFactory : ISendAsyncTerminalFactory, ISendAsync + { + SendAsync implementation; + + public SendAsyncTerminalFactory(SendAsync implementation) => this.implementation = implementation; + public SendAsyncTerminalFactory(ISendAsync implementation) => this.implementation = implementation.SendAsync; + public ISendAsync Create() => this; + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback); + } + + public partial class SendAsyncFactory : ISendAsyncFactory + { + public class Sender : ISendAsync + { + internal ISendAsync next; + internal SendAsyncStep implementation; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => implementation(request, callback, next); + } + SendAsyncStep implementation; + + public SendAsyncFactory(SendAsyncStep implementation) => this.implementation = implementation; + public ISendAsync Create(ISendAsync next) => new Sender { next = next, implementation = implementation }; + + } + + public class HttpClientFactory : ISendAsyncTerminalFactory, ISendAsync + { + HttpClient client; + public HttpClientFactory() : this(new HttpClient()) + { + } + public HttpClientFactory(HttpClient client) => this.client = client; + public ISendAsync Create() => this; + + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => client.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, callback.Token); + } + + public interface ISendAsyncFactory + { + ISendAsync Create(ISendAsync next); + } + + public interface ISendAsyncTerminalFactory + { + ISendAsync Create(); + } + + public partial class HttpPipeline : ISendAsync + { + private ISendAsync pipeline; + private ISendAsyncTerminalFactory terminal; + private List steps = new List(); + + public HttpPipeline() : this(new HttpClientFactory()) + { + } + + public HttpPipeline(ISendAsyncTerminalFactory terminalStep) + { + if (terminalStep == null) + { + throw new System.ArgumentNullException(nameof(terminalStep), "Terminal Step Factory in HttpPipeline may not be null"); + } + TerminalFactory = terminalStep; + } + + /// + /// Returns an HttpPipeline with the current state of this pipeline. + /// + public HttpPipeline Clone() => new HttpPipeline(terminal) { steps = this.steps.ToList(), pipeline = this.pipeline }; + + public ISendAsyncTerminalFactory TerminalFactory + { + get => terminal; + set + { + if (value == null) + { + throw new System.ArgumentNullException("TerminalFactory in HttpPipeline may not be null"); + } + terminal = value; + } + } + + public ISendAsync Pipeline + { + get + { + // if the pipeline has been created and not invalidated, return it. + if (this.pipeline != null) + { + return this.pipeline; + } + + // create the pipeline from scratch. + var next = terminal.Create(); + foreach (var factory in steps) + { + // skip factories that return null. + next = factory.Create(next) ?? next; + } + return this.pipeline = next; + } + } + + public int Count => steps.Count; + + public HttpPipeline Prepend(ISendAsyncFactory item) + { + if (item != null) + { + steps.Add(item); + pipeline = null; + } + return this; + } + + public HttpPipeline Append(SendAsyncStep item) + { + if (item != null) + { + Append(new SendAsyncFactory(item)); + } + return this; + } + + public HttpPipeline Prepend(SendAsyncStep item) + { + if (item != null) + { + Prepend(new SendAsyncFactory(item)); + } + return this; + } + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(new SendAsyncFactory(item)); + } + } + return this; + } + + public HttpPipeline Append(ISendAsyncFactory item) + { + if (item != null) + { + steps.Insert(0, item); + pipeline = null; + } + return this; + } + public HttpPipeline Prepend(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Prepend(item); + } + } + return this; + } + + public HttpPipeline Append(IEnumerable items) + { + if (items != null) + { + foreach (var item in items) + { + Append(item); + } + } + return this; + } + + // you can use this as the ISendAsync Implementation + public Task SendAsync(HttpRequestMessage request, IEventListener callback) => Pipeline.SendAsync(request, callback); + } + + internal static partial class Extensions + { + internal static HttpRequestMessage CloneAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.Clone(requestUri, method); + } + } + + internal static Task CloneWithContentAndDispose(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + using (original) + { + return original.CloneWithContent(requestUri, method); + } + } + + /// + /// Clones an HttpRequestMessage (without the content) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static HttpRequestMessage Clone(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = new HttpRequestMessage + { + Method = method ?? original.Method, + RequestUri = requestUri ?? original.RequestUri, + Version = original.Version, + }; + + foreach (KeyValuePair prop in original.Properties) + { + clone.Properties.Add(prop); + } + + foreach (KeyValuePair> header in original.Headers) + { + /* + **temporarily skip cloning telemetry related headers** + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + */ + if (!"x-ms-unique-id".Equals(header.Key) && !"x-ms-client-request-id".Equals(header.Key) && !"CommandName".Equals(header.Key) && !"FullCommandName".Equals(header.Key) && !"ParameterSetName".Equals(header.Key) && !"User-Agent".Equals(header.Key)) + { + clone.Headers.TryAddWithoutValidation(header.Key, header.Value); + } + } + + return clone; + } + + /// + /// Clones an HttpRequestMessage (including the content stream and content headers) + /// + /// Original HttpRequestMessage (Will be diposed before returning) + /// + /// + /// A clone of the HttpRequestMessage + internal static async Task CloneWithContent(this HttpRequestMessage original, System.Uri requestUri = null, System.Net.Http.HttpMethod method = null) + { + var clone = original.Clone(requestUri, method); + var stream = new System.IO.MemoryStream(); + if (original.Content != null) + { + await original.Content.CopyToAsync(stream).ConfigureAwait(false); + stream.Position = 0; + clone.Content = new StreamContent(stream); + if (original.Content.Headers != null) + { + foreach (var h in original.Content.Headers) + { + clone.Content.Headers.Add(h.Key, h.Value); + } + } + } + return clone; + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/InfoAttribute.cs b/swaggerci/oracle.DefaultTag/generated/runtime/InfoAttribute.cs new file mode 100644 index 000000000000..24b821d0e3cf --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/InfoAttribute.cs @@ -0,0 +1,34 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System; + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Class)] + public class InfoAttribute : Attribute + { + public bool Required { get; set; } = false; + public bool ReadOnly { get; set; } = false; + public Type[] PossibleTypes { get; set; } = new Type[0]; + public string Description { get; set; } = ""; + public string SerializedName { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class CompleterInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class DefaultInfoAttribute : Attribute + { + public string Script { get; set; } = ""; + public string Name { get; set; } = ""; + public string Description { get; set; } = ""; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Iso/IsoDate.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Iso/IsoDate.cs new file mode 100644 index 000000000000..76187c8586cb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Iso/IsoDate.cs @@ -0,0 +1,214 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal struct IsoDate + { + internal int Year { get; set; } // 0-3000 + + internal int Month { get; set; } // 1-12 + + internal int Day { get; set; } // 1-31 + + internal int Hour { get; set; } // 0-24 + + internal int Minute { get; set; } // 0-60 (60 is a special case) + + internal int Second { get; set; } // 0-60 (60 is used for leap seconds) + + internal double Millisecond { get; set; } // 0-999.9... + + internal TimeSpan Offset { get; set; } + + internal DateTimeKind Kind { get; set; } + + internal TimeSpan TimeOfDay => new TimeSpan(Hour, Minute, Second); + + internal DateTime ToDateTime() + { + if (Kind == DateTimeKind.Utc || Offset == TimeSpan.Zero) + { + return new DateTime(Year, Month, Day, Hour, Minute, Second, (int)Millisecond, DateTimeKind.Utc); + } + + return ToDateTimeOffset().DateTime; + } + + internal DateTimeOffset ToDateTimeOffset() + { + return new DateTimeOffset( + Year, + Month, + Day, + Hour, + Minute, + Second, + (int)Millisecond, + Offset + ); + } + + internal DateTime ToUtcDateTime() + { + return ToDateTimeOffset().UtcDateTime; + } + + public override string ToString() + { + var sb = new StringBuilder(); + + // yyyy-MM-dd + sb.Append($"{Year}-{Month:00}-{Day:00}"); + + if (TimeOfDay > new TimeSpan(0)) + { + sb.Append($"T{Hour:00}:{Minute:00}"); + + if (TimeOfDay.Seconds > 0) + { + sb.Append($":{Second:00}"); + } + } + + if (Offset.Ticks == 0) + { + sb.Append('Z'); // UTC + } + else + { + if (Offset.Ticks >= 0) + { + sb.Append('+'); + } + + sb.Append($"{Offset.Hours:00}:{Offset.Minutes:00}"); + } + + return sb.ToString(); + } + + internal static IsoDate FromDateTimeOffset(DateTimeOffset date) + { + return new IsoDate { + Year = date.Year, + Month = date.Month, + Day = date.Day, + Hour = date.Hour, + Minute = date.Minute, + Second = date.Second, + Offset = date.Offset, + Kind = date.Offset == TimeSpan.Zero ? DateTimeKind.Utc : DateTimeKind.Unspecified + }; + } + + private static readonly char[] timeSeperators = { ':', '.' }; + + internal static IsoDate Parse(string text) + { + var tzIndex = -1; + var timeIndex = text.IndexOf('T'); + + var builder = new IsoDate { Day = 1, Month = 1 }; + + // TODO: strip the time zone offset off the end + string dateTime = text; + string timeZone = null; + + if (dateTime.IndexOf('Z') > -1) + { + tzIndex = dateTime.LastIndexOf('Z'); + + builder.Kind = DateTimeKind.Utc; + } + else if (dateTime.LastIndexOf('+') > 10) + { + tzIndex = dateTime.LastIndexOf('+'); + } + else if (dateTime.LastIndexOf('-') > 10) + { + tzIndex = dateTime.LastIndexOf('-'); + } + + if (tzIndex > -1) + { + timeZone = dateTime.Substring(tzIndex); + dateTime = dateTime.Substring(0, tzIndex); + } + + string date = (timeIndex == -1) ? dateTime : dateTime.Substring(0, timeIndex); + + var dateParts = date.Split(Seperator.Dash); // '-' + + for (int i = 0; i < dateParts.Length; i++) + { + var part = dateParts[i]; + + switch (i) + { + case 0: builder.Year = int.Parse(part); break; + case 1: builder.Month = int.Parse(part); break; + case 2: builder.Day = int.Parse(part); break; + } + } + + if (timeIndex > -1) + { + string[] timeParts = dateTime.Substring(timeIndex + 1).Split(timeSeperators); + + for (int i = 0; i < timeParts.Length; i++) + { + var part = timeParts[i]; + + switch (i) + { + case 0: builder.Hour = int.Parse(part); break; + case 1: builder.Minute = int.Parse(part); break; + case 2: builder.Second = int.Parse(part); break; + case 3: builder.Millisecond = double.Parse("0." + part) * 1000; break; + } + } + } + + if (timeZone != null && timeZone != "Z") + { + var hours = int.Parse(timeZone.Substring(1, 2)); + var minutes = int.Parse(timeZone.Substring(4, 2)); + + if (timeZone[0] == '-') + { + hours = -hours; + minutes = -minutes; + } + + builder.Offset = new TimeSpan(hours, minutes, 0); + } + + return builder; + } + } + + /* + YYYY # eg 1997 + YYYY-MM # eg 1997-07 + YYYY-MM-DD # eg 1997-07-16 + YYYY-MM-DDThh:mmTZD # eg 1997-07-16T19:20+01:00 + YYYY-MM-DDThh:mm:ssTZD # eg 1997-07-16T19:20:30+01:00 + YYYY-MM-DDThh:mm:ss.sTZD # eg 1997-07-16T19:20:30.45+01:00 + + where: + + YYYY = four-digit year + MM = two-digit month (01=January, etc.) + DD = two-digit day of month (01 through 31) + hh = two digits of hour (00 through 23) (am/pm NOT allowed) + mm = two digits of minute (00 through 59) + ss = two digits of second (00 through 59) + s = one or more digits representing a decimal fraction of a second + TZD = time zone designator (Z or +hh:mm or -hh:mm) + */ +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/JsonType.cs b/swaggerci/oracle.DefaultTag/generated/runtime/JsonType.cs new file mode 100644 index 000000000000..4d09d1393b65 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/JsonType.cs @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal enum JsonType + { + Null = 0, + Object = 1, + Array = 2, + Binary = 3, + Boolean = 4, + Date = 5, + Number = 6, + String = 7 + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/MessageAttribute.cs b/swaggerci/oracle.DefaultTag/generated/runtime/MessageAttribute.cs new file mode 100644 index 000000000000..73246bb6dac8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/MessageAttribute.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Globalization; + using System.Linq; + using System.Management.Automation; + using System.Text; + + [AttributeUsage(AttributeTargets.All)] + public class GenericBreakingChangeAttribute : Attribute + { + private string _message; + //A dexcription of what the change is about, non mandatory + public string ChangeDescription { get; set; } = null; + + //The version the change is effective from, non mandatory + public string DeprecateByVersion { get; } + public string DeprecateByAzVersion { get; } + + //The date on which the change comes in effect + public DateTime ChangeInEfectByDate { get; } + public bool ChangeInEfectByDateSet { get; } = false; + + //Old way of calling the cmdlet + public string OldWay { get; set; } + //New way fo calling the cmdlet + public string NewWay { get; set; } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion) + { + _message = message; + this.DeprecateByAzVersion = deprecateByAzVersion; + this.DeprecateByVersion = deprecateByVersion; + } + + public GenericBreakingChangeAttribute(string message, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) + { + _message = message; + this.DeprecateByVersion = deprecateByVersion; + this.DeprecateByAzVersion = deprecateByAzVersion; + + if (DateTime.TryParse(changeInEfectByDate, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.ChangeInEfectByDate = result; + this.ChangeInEfectByDateSet = true; + } + } + + public DateTime getInEffectByDate() + { + return this.ChangeInEfectByDate.Date; + } + + + /** + * This function prints out the breaking change message for the attribute on the cmdline + * */ + public void PrintCustomAttributeInfo(Action writeOutput) + { + + if (!GetAttributeSpecificMessage().StartsWith(Environment.NewLine)) + { + writeOutput(Environment.NewLine); + } + writeOutput(string.Format(Resources.BreakingChangesAttributesDeclarationMessage, GetAttributeSpecificMessage())); + + + if (!string.IsNullOrWhiteSpace(ChangeDescription)) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesChangeDescriptionMessage, this.ChangeDescription)); + } + + if (ChangeInEfectByDateSet) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByDateMessage, this.ChangeInEfectByDate.ToString("d"))); + } + + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByAzVersion, this.DeprecateByAzVersion)); + writeOutput(string.Format(Resources.BreakingChangesAttributesInEffectByVersion, this.DeprecateByVersion)); + + if (OldWay != null && NewWay != null) + { + writeOutput(string.Format(Resources.BreakingChangesAttributesUsageChangeMessageConsole, OldWay, NewWay)); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + + protected virtual string GetAttributeSpecificMessage() + { + return _message; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class CmdletBreakingChangeAttribute : GenericBreakingChangeAttribute + { + + public string ReplacementCmdletName { get; set; } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + } + + public CmdletBreakingChangeAttribute(string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + } + + protected override string GetAttributeSpecificMessage() + { + if (string.IsNullOrWhiteSpace(ReplacementCmdletName)) + { + return Resources.BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement; + } + else + { + return string.Format(Resources.BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement, ReplacementCmdletName); + } + } + } + + [AttributeUsage(AttributeTargets.All)] + public class ParameterSetBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string[] ChangedParameterSet { set; get; } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + ChangedParameterSet = changedParameterSet; + } + + public ParameterSetBreakingChangeAttribute(string[] changedParameterSet, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + ChangedParameterSet = changedParameterSet; + } + + protected override string GetAttributeSpecificMessage() + { + + return Resources.BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement; + + } + + public bool IsApplicableToInvocation(InvocationInfo invocation, string parameterSetName) + { + if (ChangedParameterSet != null) + return ChangedParameterSet.Contains(parameterSetName); + return false; + } + + } + + [AttributeUsage(AttributeTargets.All)] + public class PreviewMessageAttribute : Attribute + { + public string _message; + + public DateTime EstimatedGaDate { get; } + + public bool IsEstimatedGaDateSet { get; } = false; + + + public PreviewMessageAttribute() + { + this._message = Resources.PreviewCmdletMessage; + } + + public PreviewMessageAttribute(string message) + { + this._message = string.IsNullOrEmpty(message) ? Resources.PreviewCmdletMessage : message; + } + + public PreviewMessageAttribute(string message, string estimatedDateOfGa) : this(message) + { + if (DateTime.TryParse(estimatedDateOfGa, new CultureInfo("en-US"), DateTimeStyles.None, out DateTime result)) + { + this.EstimatedGaDate = result; + this.IsEstimatedGaDateSet = true; + } + } + + public void PrintCustomAttributeInfo(Action writeOutput) + { + writeOutput(this._message); + + if (IsEstimatedGaDateSet) + { + writeOutput(string.Format(Resources.PreviewCmdletETAMessage, this.EstimatedGaDate.ToShortDateString())); + } + } + + public virtual bool IsApplicableToInvocation(InvocationInfo invocation) + { + return true; + } + } + + [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)] + public class ParameterBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string NameOfParameterChanging { get; } + + public string ReplaceMentCmdletParameterName { get; set; } = null; + + public bool IsBecomingMandatory { get; set; } = false; + + public String OldParamaterType { get; set; } + + public String NewParameterType { get; set; } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + public ParameterBreakingChangeAttribute(string nameOfParameterChanging, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.NameOfParameterChanging = nameOfParameterChanging; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + if (!string.IsNullOrWhiteSpace(ReplaceMentCmdletParameterName)) + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplacedMandatory, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterReplaced, NameOfParameterChanging, ReplaceMentCmdletParameterName)); + } + } + else + { + if (IsBecomingMandatory) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterMandatoryNow, NameOfParameterChanging)); + } + else + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterChanging, NameOfParameterChanging)); + } + } + + //See if the type of the param is changing + if (OldParamaterType != null && !string.IsNullOrWhiteSpace(NewParameterType)) + { + message.Append(string.Format(Resources.BreakingChangeAttributeParameterTypeChange, OldParamaterType, NewParameterType)); + } + return message.ToString(); + } + + /// + /// See if the bound parameters contain the current parameter, if they do + /// then the attribbute is applicable + /// If the invocationInfo is null we return true + /// + /// + /// bool + public override bool IsApplicableToInvocation(InvocationInfo invocationInfo) + { + bool? applicable = invocationInfo == null ? true : invocationInfo.BoundParameters?.Keys?.Contains(this.NameOfParameterChanging); + return applicable.HasValue ? applicable.Value : false; + } + } + + [AttributeUsage(AttributeTargets.All)] + public class OutputBreakingChangeAttribute : GenericBreakingChangeAttribute + { + public string DeprecatedCmdLetOutputType { get; } + + //This is still a String instead of a Type as this + //might be undefined at the time of adding the attribute + public string ReplacementCmdletOutputType { get; set; } + + public string[] DeprecatedOutputProperties { get; set; } + + public string[] NewOutputProperties { get; set; } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + public OutputBreakingChangeAttribute(string deprecatedCmdletOutputType, string deprecateByAzVersion, string deprecateByVersion, string changeInEfectByDate) : + base(string.Empty, deprecateByAzVersion, deprecateByVersion, changeInEfectByDate) + { + this.DeprecatedCmdLetOutputType = deprecatedCmdletOutputType; + } + + protected override string GetAttributeSpecificMessage() + { + StringBuilder message = new StringBuilder(); + + //check for the deprecation scenario + if (string.IsNullOrWhiteSpace(ReplacementCmdletOutputType) && NewOutputProperties == null && DeprecatedOutputProperties == null && string.IsNullOrWhiteSpace(ChangeDescription)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputTypeDeprecated, DeprecatedCmdLetOutputType)); + } + else + { + if (!string.IsNullOrWhiteSpace(ReplacementCmdletOutputType)) + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange1, DeprecatedCmdLetOutputType, ReplacementCmdletOutputType)); + } + else + { + message.Append(string.Format(Resources.BreakingChangesAttributesCmdLetOutputChange2, DeprecatedCmdLetOutputType)); + } + + if (DeprecatedOutputProperties != null && DeprecatedOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesRemoved); + foreach (string property in DeprecatedOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + + if (NewOutputProperties != null && NewOutputProperties.Length > 0) + { + message.Append(Resources.BreakingChangesAttributesCmdLetOutputPropertiesAdded); + foreach (string property in NewOutputProperties) + { + message.Append(" '" + property + "'"); + } + } + } + return message.ToString(); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/MessageAttributeHelper.cs b/swaggerci/oracle.DefaultTag/generated/runtime/MessageAttributeHelper.cs new file mode 100644 index 000000000000..479ad8b39c32 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/MessageAttributeHelper.cs @@ -0,0 +1,184 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.generated.runtime.Properties; + using System; + using System.Collections.Generic; + using System.Linq; + using System.Management.Automation; + using System.Reflection; + using System.Text; + using System.Threading.Tasks; + public class MessageAttributeHelper + { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); + public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; + public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And reads all the deprecation attributes attached to it + * Prints a message on the cmdline For each of the attribute found + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + * */ + public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet, bool showPreviewMessage = true) + { + bool supressWarningOrError = false; + + try + { + supressWarningOrError = bool.Parse(System.Environment.GetEnvironmentVariable(SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME)); + } + catch (Exception) + { + //no action + } + + if (supressWarningOrError) + { + //Do not process the attributes at runtime... The env variable to override the warning messages is set + return; + } + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } + + ProcessBreakingChangeAttributesAtRuntime(commandInfo, invocationInfo, parameterSet, psCmdlet); + + } + + private static void ProcessBreakingChangeAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (attributes != null && attributes.Count > 0) + { + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesHeaderMessage, commandInfo.Name.Split('_')[0])); + + foreach (GenericBreakingChangeAttribute attribute in attributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + + appendAttributeMessage(string.Format(Resources.BreakingChangesAttributesFooterMessage, BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK)); + + psCmdlet.WriteWarning(sb.ToString()); + } + } + + + public static void ProcessPreviewMessageAttributesAtRuntime(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet, System.Management.Automation.PSCmdlet psCmdlet) + { + List previewAttributes = new List(GetAllPreviewAttributesInType(commandInfo, invocationInfo)); + StringBuilder sb = new StringBuilder(); + Action appendAttributeMessage = (string s) => sb.Append(s); + + if (previewAttributes != null && previewAttributes.Count > 0) + { + foreach (PreviewMessageAttribute attribute in previewAttributes) + { + attribute.PrintCustomAttributeInfo(appendAttributeMessage); + } + psCmdlet.WriteWarning(sb.ToString()); + } + } + + /** + * This function takes in a CommandInfo (CmdletInfo or FunctionInfo) + * And returns all the deprecation attributes attached to it + * + * the boundParameterNames is a list of parameters bound to the cmdlet at runtime, + * We only process the Parameter beaking change attributes attached only params listed in this list (if present) + **/ + private static IEnumerable GetAllBreakingChangeAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo, String parameterSet) + { + List attributeList = new List(); + + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(GenericBreakingChangeAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(GenericBreakingChangeAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.GetType() == typeof(ParameterSetBreakingChangeAttribute) ? ((ParameterSetBreakingChangeAttribute)e).IsApplicableToInvocation(invocationInfo, parameterSet) : e.IsApplicableToInvocation(invocationInfo)); + } + + public static bool ContainsPreviewAttribute(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + return GetAllPreviewAttributesInType(commandInfo, invocationInfo)?.Count() > 0; + } + + private static IEnumerable GetAllPreviewAttributesInType(CommandInfo commandInfo, InvocationInfo invocationInfo) + { + List attributeList = new List(); + if (commandInfo.GetType() == typeof(CmdletInfo)) + { + var type = ((CmdletInfo)commandInfo).ImplementingType; + attributeList.AddRange(type.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + + foreach (MethodInfo m in type.GetRuntimeMethods()) + { + attributeList.AddRange((m.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast())); + } + + foreach (FieldInfo f in type.GetRuntimeFields()) + { + attributeList.AddRange(f.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + + foreach (PropertyInfo p in type.GetRuntimeProperties()) + { + attributeList.AddRange(p.GetCustomAttributes(typeof(PreviewMessageAttribute), false).Cast()); + } + } + else if (commandInfo.GetType() == typeof(FunctionInfo)) + { + attributeList.AddRange(((FunctionInfo)commandInfo).ScriptBlock.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + foreach (var parameter in ((FunctionInfo)commandInfo).Parameters) + { + attributeList.AddRange(parameter.Value.Attributes.Where(e => typeof(PreviewMessageAttribute).IsAssignableFrom(e.GetType())).Cast()); + } + } + return invocationInfo == null ? attributeList : attributeList.Where(e => e.IsApplicableToInvocation(invocationInfo)); + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Method.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Method.cs new file mode 100644 index 000000000000..bd57d0fb084a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Method.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + internal static class Method + { + internal static System.Net.Http.HttpMethod Get = System.Net.Http.HttpMethod.Get; + internal static System.Net.Http.HttpMethod Put = System.Net.Http.HttpMethod.Put; + internal static System.Net.Http.HttpMethod Head = System.Net.Http.HttpMethod.Head; + internal static System.Net.Http.HttpMethod Post = System.Net.Http.HttpMethod.Post; + internal static System.Net.Http.HttpMethod Delete = System.Net.Http.HttpMethod.Delete; + internal static System.Net.Http.HttpMethod Options = System.Net.Http.HttpMethod.Options; + internal static System.Net.Http.HttpMethod Trace = System.Net.Http.HttpMethod.Trace; + internal static System.Net.Http.HttpMethod Patch = new System.Net.Http.HttpMethod("PATCH"); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonMember.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonMember.cs new file mode 100644 index 000000000000..d80b8e1a8510 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonMember.cs @@ -0,0 +1,83 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Reflection; +using System.Runtime.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + + + internal sealed class JsonMember + { + private readonly TypeDetails type; + + private readonly Func getter; + private readonly Action setter; + + internal JsonMember(PropertyInfo property, int defaultOrder) + { + getter = property.GetValue; + setter = property.SetValue; + + var dataMember = property.GetCustomAttribute(); + + Name = dataMember?.Name ?? property.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(property.PropertyType); + + CanRead = property.CanRead; + } + + internal JsonMember(FieldInfo field, int defaultOrder) + { + getter = field.GetValue; + setter = field.SetValue; + + var dataMember = field.GetCustomAttribute(); + + Name = dataMember?.Name ?? field.Name; + Order = dataMember?.Order ?? defaultOrder; + EmitDefaultValue = dataMember?.EmitDefaultValue ?? true; + + this.type = TypeDetails.Get(field.FieldType); + + CanRead = true; + } + + internal string Name { get; } + + internal int Order { get; } + + internal TypeDetails TypeDetails => type; + + internal Type Type => type.NonNullType; + + internal bool IsList => type.IsList; + + // Arrays, Sets, ... + internal Type ElementType => type.ElementType; + + internal IJsonConverter Converter => type.JsonConverter; + + internal bool EmitDefaultValue { get; } + + internal bool IsStringLike => type.IsStringLike; + + internal object DefaultValue => type.DefaultValue; + + internal bool CanRead { get; } + + #region Helpers + + internal object GetValue(object instance) => getter(instance); + + internal void SetValue(object instance, object value) => setter(instance, value); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonModel.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonModel.cs new file mode 100644 index 000000000000..fdda017ebb32 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonModel.cs @@ -0,0 +1,89 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; +using System.Reflection; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal class JsonModel + { + private Dictionary map; + private readonly object _sync = new object(); + + private JsonModel(Type type, List members) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Members = members ?? throw new ArgumentNullException(nameof(members)); + } + + internal string Name => Type.Name; + + internal Type Type { get; } + + internal List Members { get; } + + internal JsonMember this[string name] + { + get + { + if (map == null) + { + lock (_sync) + { + if (map == null) + { + map = new Dictionary(); + + foreach (JsonMember m in Members) + { + map[m.Name.ToLower()] = m; + } + } + } + } + + + map.TryGetValue(name.ToLower(), out JsonMember member); + + return member; + } + } + + internal static JsonModel FromType(Type type) + { + var members = new List(); + + int i = 0; + + // BindingFlags.Instance | BindingFlags.Public + + foreach (var member in type.GetFields()) + { + if (member.IsStatic) continue; + + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + foreach (var member in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (member.IsDefined(typeof(IgnoreDataMemberAttribute))) continue; + + members.Add(new JsonMember(member, i)); + + i++; + } + + members.Sort((a, b) => a.Order.CompareTo(b.Order)); // inline sort + + return new JsonModel(type, members); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonModelCache.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonModelCache.cs new file mode 100644 index 000000000000..2bd968578fa7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Models/JsonModelCache.cs @@ -0,0 +1,19 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Runtime.CompilerServices; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal static class JsonModelCache + { + private static readonly ConditionalWeakTable cache + = new ConditionalWeakTable(); + + internal static JsonModel Get(Type type) => cache.GetValue(type, Create); + + private static JsonModel Create(Type type) => JsonModel.FromType(type); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/JsonArray.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/JsonArray.cs new file mode 100644 index 000000000000..10df399c04d0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/JsonArray.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public abstract partial class JsonArray : JsonNode, IEnumerable + { + internal override JsonType Type => JsonType.Array; + + internal abstract JsonType? ElementType { get; } + + public abstract int Count { get; } + + internal virtual bool IsSet => false; + + internal bool IsEmpty => Count == 0; + + #region IEnumerable + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + IEnumerator IEnumerable.GetEnumerator() + { + throw new NotImplementedException(); + } + + #endregion + + #region Static Helpers + + internal static JsonArray Create(short[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(int[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(long[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(decimal[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(float[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(string[] values) + => new XImmutableArray(values); + + internal static JsonArray Create(XBinary[] values) + => new XImmutableArray(values); + + #endregion + + internal static new JsonArray Parse(string text) + => (JsonArray)JsonNode.Parse(text); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XImmutableArray.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XImmutableArray.cs new file mode 100644 index 000000000000..9ea0dcd783a8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XImmutableArray.cs @@ -0,0 +1,62 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal sealed class XImmutableArray : JsonArray, IEnumerable + { + private readonly T[] values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XImmutableArray(T[] values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Length; + + public bool IsReadOnly => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (T value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + #region Static Constructor + + internal XImmutableArray Create(T[] items) + { + return new XImmutableArray(items); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XList.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XList.cs new file mode 100644 index 000000000000..c3f52000085c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XList.cs @@ -0,0 +1,64 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal sealed class XList : JsonArray, IEnumerable + { + private readonly IList values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XList(IList values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + public override JsonNode this[int index] => + XHelper.Create(elementType, elementCode, values[index]); + + internal override JsonType? ElementType => elementType; + + public override int Count => values.Count; + + public bool IsReadOnly => values.IsReadOnly; + + #region IList + + public void Add(T value) + { + values.Add(value); + } + + public bool Contains(T value) => values.Contains(value); + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XNodeArray.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XNodeArray.cs new file mode 100644 index 000000000000..af745dae19fc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XNodeArray.cs @@ -0,0 +1,68 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed partial class XNodeArray : JsonArray, ICollection + { + private readonly List items; + + internal XNodeArray() + { + items = new List(); + } + + internal XNodeArray(params JsonNode[] values) + { + items = new List(values); + } + + public override JsonNode this[int index] => items[index]; + + internal override JsonType? ElementType => null; + + public bool IsReadOnly => false; + + public override int Count => items.Count; + + #region ICollection Members + + public void Add(JsonNode item) + { + items.Add(item); + } + + void ICollection.Clear() + { + items.Clear(); + } + + public bool Contains(JsonNode item) => items.Contains(item); + + void ICollection.CopyTo(JsonNode[] array, int arrayIndex) + { + items.CopyTo(array, arrayIndex); + } + + public bool Remove(JsonNode item) + { + return items.Remove(item); + } + + #endregion + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XSet.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XSet.cs new file mode 100644 index 000000000000..2df06fa4f0c4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/Collections/XSet.cs @@ -0,0 +1,60 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal sealed class XSet : JsonArray, IEnumerable + { + private readonly HashSet values; + private readonly JsonType elementType; + private readonly TypeCode elementCode; + + internal XSet(IEnumerable values) + : this(new HashSet(values)) + { } + + internal XSet(HashSet values) + { + this.values = values ?? throw new ArgumentNullException(nameof(values)); + this.elementCode = System.Type.GetTypeCode(typeof(T)); + this.elementType = XHelper.GetElementType(this.elementCode); + } + + internal override JsonType Type => JsonType.Array; + + internal override JsonType? ElementType => elementType; + + public bool IsReadOnly => true; + + public override int Count => values.Count; + + internal override bool IsSet => true; + + #region IEnumerable Members + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + IEnumerator IEnumerable.GetEnumerator() + { + foreach (var value in values) + { + yield return XHelper.Create(elementType, elementCode, value); + } + } + + #endregion + + internal HashSet AsHashSet() => values; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonBoolean.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonBoolean.cs new file mode 100644 index 000000000000..36e70e5f14f4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonBoolean.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal sealed partial class JsonBoolean : JsonNode + { + internal static readonly JsonBoolean True = new JsonBoolean(true); + internal static readonly JsonBoolean False = new JsonBoolean(false); + + internal JsonBoolean(bool value) + { + Value = value; + } + + internal bool Value { get; } + + internal override JsonType Type => JsonType.Boolean; + + internal static new JsonBoolean Parse(string text) + { + switch (text) + { + case "false": return False; + case "true": return True; + + default: throw new ArgumentException($"Expected true or false. Was {text}."); + } + } + + #region Implicit Casts + + public static implicit operator bool(JsonBoolean data) => data.Value; + + public static implicit operator JsonBoolean(bool data) => new JsonBoolean(data); + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonDate.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonDate.cs new file mode 100644 index 000000000000..52b93a696a24 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonDate.cs @@ -0,0 +1,173 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + + + internal sealed partial class JsonDate : JsonNode, IEquatable, IComparable + { + internal static bool AssumeUtcWhenKindIsUnspecified = true; + + private readonly DateTimeOffset value; + + internal JsonDate(DateTime value) + { + if (value.Kind == DateTimeKind.Unspecified && AssumeUtcWhenKindIsUnspecified) + { + value = DateTime.SpecifyKind(value, DateTimeKind.Utc); + } + + this.value = value; + } + + internal JsonDate(DateTimeOffset value) + { + this.value = value; + } + + internal override JsonType Type => JsonType.Date; + + #region Helpers + + internal DateTimeOffset ToDateTimeOffset() + { + return value; + } + + internal DateTime ToDateTime() + { + if (value.Offset == TimeSpan.Zero) + { + return value.UtcDateTime; + } + + return value.DateTime; + } + + internal DateTime ToUtcDateTime() => value.UtcDateTime; + + internal int ToUnixTimeSeconds() + { + return (int)value.ToUnixTimeSeconds(); + } + + internal long ToUnixTimeMilliseconds() + { + return (int)value.ToUnixTimeMilliseconds(); + } + + internal string ToIsoString() + { + return IsoDate.FromDateTimeOffset(value).ToString(); + } + + #endregion + + public override string ToString() + { + return ToIsoString(); + } + + internal static new JsonDate Parse(string text) + { + if (text == null) throw new ArgumentNullException(nameof(text)); + + // TODO support: unixtimeseconds.partialseconds + + if (text.Length > 4 && _IsNumber(text)) // UnixTime + { + var date = DateTimeOffset.FromUnixTimeSeconds(long.Parse(text)); + + return new JsonDate(date); + } + else if (text.Length <= 4 || text[4] == '-') // ISO: 2012- + { + return new JsonDate(IsoDate.Parse(text).ToDateTimeOffset()); + } + else + { + // NOT ISO ENCODED + // "Thu, 5 Apr 2012 16:59:01 +0200", + return new JsonDate(DateTimeOffset.Parse(text)); + } + } + + private static bool _IsNumber(string text) + { + foreach (var c in text) + { + if (!char.IsDigit(c)) return false; + } + + return true; + } + + internal static JsonDate FromUnixTime(int seconds) + { + return new JsonDate(DateTimeOffset.FromUnixTimeSeconds(seconds)); + } + + internal static JsonDate FromUnixTime(double seconds) + { + var milliseconds = (long)(seconds * 1000d); + + return new JsonDate(DateTimeOffset.FromUnixTimeMilliseconds(milliseconds)); + } + + #region Implicit Casts + + public static implicit operator DateTimeOffset(JsonDate value) + => value.ToDateTimeOffset(); + + public static implicit operator DateTime(JsonDate value) + => value.ToDateTime(); + + // From Date + public static implicit operator JsonDate(DateTimeOffset value) + { + return new JsonDate(value); + } + + public static implicit operator JsonDate(DateTime value) + { + return new JsonDate(value); + } + + // From String + public static implicit operator JsonDate(string value) + { + return Parse(value); + } + + #endregion + + #region Equality + + public override bool Equals(object obj) + { + return obj is JsonDate date && date.value == this.value; + } + + public bool Equals(JsonDate other) + { + return this.value == other.value; + } + + public override int GetHashCode() => value.GetHashCode(); + + #endregion + + #region IComparable Members + + int IComparable.CompareTo(JsonDate other) + { + return value.CompareTo(other.value); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonNode.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonNode.cs new file mode 100644 index 000000000000..419d87a75668 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonNode.cs @@ -0,0 +1,250 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.IO; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + + + public abstract partial class JsonNode + { + internal abstract JsonType Type { get; } + + public virtual JsonNode this[int index] => throw new NotImplementedException(); + + public virtual JsonNode this[string name] + { + get => throw new NotImplementedException(); + set => throw new NotImplementedException(); + } + + #region Type Helpers + + internal bool IsArray => Type == JsonType.Array; + + internal bool IsDate => Type == JsonType.Date; + + internal bool IsObject => Type == JsonType.Object; + + internal bool IsNumber => Type == JsonType.Number; + + internal bool IsNull => Type == JsonType.Null; + + #endregion + + internal void WriteTo(TextWriter textWriter, bool pretty = true) + { + var writer = new JsonWriter(textWriter, pretty); + + writer.WriteNode(this); + } + + internal T As() + where T : new() + => new JsonSerializer().Deseralize((JsonObject)this); + + internal T[] ToArrayOf() + { + return (T[])new JsonSerializer().DeserializeArray(typeof(T[]), (JsonArray)this); + } + + #region ToString Overrides + + public override string ToString() => ToString(pretty: true); + + internal string ToString(bool pretty) + { + var sb = new StringBuilder(); + + using (var writer = new StringWriter(sb)) + { + WriteTo(writer, pretty); + + return sb.ToString(); + } + } + + #endregion + + #region Static Constructors + + internal static JsonNode Parse(string text) + { + return Parse(new SourceReader(new StringReader(text))); + } + + internal static JsonNode Parse(TextReader textReader) + => Parse(new SourceReader(textReader)); + + private static JsonNode Parse(SourceReader sourceReader) + { + using (var parser = new JsonParser(sourceReader)) + { + return parser.ReadNode(); + } + } + + internal static JsonNode FromObject(object instance) + => new JsonSerializer().Serialize(instance); + + #endregion + + #region Implict Casts + + public static implicit operator string(JsonNode node) => node.ToString(); + + #endregion + + #region Explict Casts + + public static explicit operator DateTime(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date: + return ((JsonDate)node).ToDateTime(); + + case JsonType.String: + return JsonDate.Parse(node.ToString()).ToDateTime(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num).UtcDateTime; + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)).UtcDateTime; + } + } + + throw new ConversionException(node, typeof(DateTime)); + } + + public static explicit operator DateTimeOffset(JsonNode node) + { + switch (node.Type) + { + case JsonType.Date : return ((JsonDate)node).ToDateTimeOffset(); + case JsonType.String : return JsonDate.Parse(node.ToString()).ToDateTimeOffset(); + + case JsonType.Number: + var num = (JsonNumber)node; + + if (num.IsInteger) + { + return DateTimeOffset.FromUnixTimeSeconds(num); + } + else + { + return DateTimeOffset.FromUnixTimeMilliseconds((long)((double)num * 1000)); + } + + } + + throw new ConversionException(node, typeof(DateTimeOffset)); + } + + public static explicit operator float(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return float.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(float)); + } + + public static explicit operator double(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return double.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(double)); + } + + public static explicit operator decimal(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return decimal.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(decimal)); + } + + public static explicit operator Guid(JsonNode node) + => new Guid(node.ToString()); + + public static explicit operator short(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return short.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(short)); + } + + public static explicit operator int(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number : return (JsonNumber)node; + case JsonType.String : return int.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(int)); + } + + public static explicit operator long(JsonNode node) + { + switch (node.Type) + { + case JsonType.Number: return (JsonNumber)node; + case JsonType.String: return long.Parse(node.ToString()); + } + + throw new ConversionException(node, typeof(long)); + } + + public static explicit operator bool(JsonNode node) + => ((JsonBoolean)node).Value; + + public static explicit operator ushort(JsonNode node) + => (JsonNumber)node; + + public static explicit operator uint(JsonNode node) + => (JsonNumber)node; + + public static explicit operator ulong(JsonNode node) + => (JsonNumber)node; + + public static explicit operator TimeSpan(JsonNode node) + => TimeSpan.Parse(node.ToString()); + + public static explicit operator Uri(JsonNode node) + { + if (node.Type == JsonType.String) + { + return new Uri(node.ToString()); + } + + throw new ConversionException(node, typeof(Uri)); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonNumber.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonNumber.cs new file mode 100644 index 000000000000..4922bb58dbaa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonNumber.cs @@ -0,0 +1,109 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed partial class JsonNumber : JsonNode + { + private readonly string value; + private readonly bool overflows = false; + + internal JsonNumber(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal JsonNumber(int value) + { + this.value = value.ToString(); + } + + internal JsonNumber(long value) + { + this.value = value.ToString(); + + if (value > 9007199254740991) + { + overflows = true; + } + } + + internal JsonNumber(float value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal JsonNumber(double value) + { + this.value = value.ToString(System.Globalization.CultureInfo.InvariantCulture); + } + + internal override JsonType Type => JsonType.Number; + + internal string Value => value; + + #region Helpers + + internal bool Overflows => overflows; + + internal bool IsInteger => !value.Contains("."); + + internal bool IsFloat => value.Contains("."); + + #endregion + + #region Casting + + public static implicit operator byte(JsonNumber number) + => byte.Parse(number.Value); + + public static implicit operator short(JsonNumber number) + => short.Parse(number.Value); + + public static implicit operator int(JsonNumber number) + => int.Parse(number.Value); + + public static implicit operator long(JsonNumber number) + => long.Parse(number.value); + + public static implicit operator UInt16(JsonNumber number) + => ushort.Parse(number.Value); + + public static implicit operator UInt32(JsonNumber number) + => uint.Parse(number.Value); + + public static implicit operator UInt64(JsonNumber number) + => ulong.Parse(number.Value); + + public static implicit operator decimal(JsonNumber number) + => decimal.Parse(number.Value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator Double(JsonNumber number) + => double.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator float(JsonNumber number) + => float.Parse(number.value, System.Globalization.CultureInfo.InvariantCulture); + + public static implicit operator JsonNumber(short data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(int data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(long data) + => new JsonNumber(data); + + public static implicit operator JsonNumber(Single data) + => new JsonNumber(data.ToString()); + + public static implicit operator JsonNumber(double data) + => new JsonNumber(data.ToString()); + + #endregion + + public override string ToString() => value; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonObject.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonObject.cs new file mode 100644 index 000000000000..8235da62ffd2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonObject.cs @@ -0,0 +1,172 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public partial class JsonObject : JsonNode, IDictionary + { + private readonly Dictionary items; + + internal JsonObject() + { + items = new Dictionary(); + } + + internal JsonObject(IEnumerable> properties) + { + if (properties == null) throw new ArgumentNullException(nameof(properties)); + + items = new Dictionary(); + + foreach (var field in properties) + { + items.Add(field.Key, field.Value); + } + } + + #region IDictionary Constructors + + internal JsonObject(IDictionary dic) + { + items = new Dictionary(dic.Count); + + foreach (var pair in dic) + { + Add(pair.Key, pair.Value); + } + } + + #endregion + + internal override JsonType Type => JsonType.Object; + + #region Add Overloads + + public void Add(string name, JsonNode value) => + items.Add(name, value); + + public void Add(string name, byte[] value) => + items.Add(name, new XBinary(value)); + + public void Add(string name, DateTime value) => + items.Add(name, new JsonDate(value)); + + public void Add(string name, int value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, long value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, float value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, double value) => + items.Add(name, new JsonNumber(value.ToString())); + + public void Add(string name, string value) => + items.Add(name, new JsonString(value)); + + public void Add(string name, bool value) => + items.Add(name, new JsonBoolean(value)); + + public void Add(string name, Uri url) => + items.Add(name, new JsonString(url.AbsoluteUri)); + + public void Add(string name, string[] values) => + items.Add(name, new XImmutableArray(values)); + + public void Add(string name, int[] values) => + items.Add(name, new XImmutableArray(values)); + + #endregion + + #region ICollection> Members + + void ICollection>.Add(KeyValuePair item) + { + items.Add(item.Key, item.Value); + } + + void ICollection>.Clear() + { + items.Clear(); + } + + bool ICollection>.Contains(KeyValuePair item) => + throw new NotImplementedException(); + + void ICollection>.CopyTo(KeyValuePair[] array, int arrayIndex) => + throw new NotImplementedException(); + + + int ICollection>.Count => items.Count; + + bool ICollection>.IsReadOnly => false; + + bool ICollection>.Remove(KeyValuePair item) => + throw new NotImplementedException(); + + #endregion + + #region IDictionary Members + + public bool ContainsKey(string key) => items.ContainsKey(key); + + public ICollection Keys => items.Keys; + + public bool Remove(string key) => items.Remove(key); + + public bool TryGetValue(string key, out JsonNode value) => + items.TryGetValue(key, out value); + + public ICollection Values => items.Values; + + public override JsonNode this[string key] + { + get => items[key]; + set => items[key] = value; + } + + #endregion + + #region IEnumerable + + IEnumerator> IEnumerable>.GetEnumerator() + => items.GetEnumerator(); + + IEnumerator IEnumerable.GetEnumerator() + => items.GetEnumerator(); + + #endregion + + #region Helpers + + internal static new JsonObject FromObject(object instance) => + (JsonObject)new JsonSerializer().Serialize(instance); + + #endregion + + #region Static Constructors + + internal static JsonObject FromStream(Stream stream) + { + using (var tr = new StreamReader(stream)) + { + return (JsonObject)Parse(tr); + } + } + + internal static new JsonObject Parse(string text) + { + return (JsonObject)JsonNode.Parse(text); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonString.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonString.cs new file mode 100644 index 000000000000..aee91ba9156a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/JsonString.cs @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed partial class JsonString : JsonNode, IEquatable + { + private readonly string value; + + internal JsonString(string value) + { + this.value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal override JsonType Type => JsonType.String; + + internal string Value => value; + + internal int Length => value.Length; + + #region #region Implicit Casts + + public static implicit operator string(JsonString data) => data.Value; + + public static implicit operator JsonString(string value) => new JsonString(value); + + #endregion + + public override int GetHashCode() => value.GetHashCode(); + + public override string ToString() => value; + + #region IEquatable + + bool IEquatable.Equals(JsonString other) => this.Value == other.Value; + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/XBinary.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/XBinary.cs new file mode 100644 index 000000000000..69fc1d8d55ad --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/XBinary.cs @@ -0,0 +1,40 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal sealed class XBinary : JsonNode + { + private readonly byte[] _value; + private readonly string _base64; + + internal XBinary(byte[] value) + { + _value = value ?? throw new ArgumentNullException(nameof(value)); + } + + internal XBinary(string base64EncodedString) + { + _base64 = base64EncodedString ?? throw new ArgumentNullException(nameof(base64EncodedString)); + } + + internal override JsonType Type => JsonType.Binary; + + internal byte[] Value => _value ?? Convert.FromBase64String(_base64); + + #region #region Implicit Casts + + public static implicit operator byte[] (XBinary data) => data.Value; + + public static implicit operator XBinary(byte[] data) => new XBinary(data); + + #endregion + + public override int GetHashCode() => Value.GetHashCode(); + + public override string ToString() => _base64 ?? Convert.ToBase64String(_value); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/XNull.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/XNull.cs new file mode 100644 index 000000000000..a6b9be630b33 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Nodes/XNull.cs @@ -0,0 +1,15 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal sealed class XNull : JsonNode + { + internal static readonly XNull Instance = new XNull(); + + private XNull() { } + + internal override JsonType Type => JsonType.Null; + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Exceptions/ParseException.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Exceptions/ParseException.cs new file mode 100644 index 000000000000..8759c0656de3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Exceptions/ParseException.cs @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal class ParserException : Exception + { + internal ParserException(string message) + : base(message) + { } + + internal ParserException(string message, SourceLocation location) + : base(message) + { + + Location = location; + } + + internal SourceLocation Location { get; } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonParser.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonParser.cs new file mode 100644 index 000000000000..7a16f0ee979c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonParser.cs @@ -0,0 +1,180 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public class JsonParser : IDisposable + { + private readonly TokenReader reader; + + internal JsonParser(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonParser(SourceReader sourceReader) + { + if (sourceReader == null) + throw new ArgumentNullException(nameof(sourceReader)); + + this.reader = new TokenReader(new JsonTokenizer(sourceReader)); + + this.reader.Next(); // Start with the first token + } + + internal IEnumerable ReadNodes() + { + JsonNode node; + + while ((node = ReadNode()) != null) yield return node; + } + + internal JsonNode ReadNode() + { + if (reader.Current.Kind == TokenKind.Eof || reader.Current.IsTerminator) + { + return null; + } + + switch (reader.Current.Kind) + { + case TokenKind.LeftBrace : return ReadObject(); // { + case TokenKind.LeftBracket : return ReadArray(); // [ + + default: throw new ParserException($"Expected '{{' or '['. Was {reader.Current}."); + } + } + + private JsonNode ReadFieldValue() + { + // Boolean, Date, Null, Number, String, Uri + if (reader.Current.IsLiteral) + { + return ReadLiteral(); + } + else + { + switch (reader.Current.Kind) + { + case TokenKind.LeftBracket: return ReadArray(); + case TokenKind.LeftBrace : return ReadObject(); + + default: throw new ParserException($"Unexpected token reading field value. Was {reader.Current}."); + } + } + } + + private JsonNode ReadLiteral() + { + var literal = reader.Current; + + reader.Next(); // Read the literal token + + switch (literal.Kind) + { + case TokenKind.Boolean : return JsonBoolean.Parse(literal.Value); + case TokenKind.Null : return XNull.Instance; + case TokenKind.Number : return new JsonNumber(literal.Value); + case TokenKind.String : return new JsonString(literal.Value); + + default: throw new ParserException($"Unexpected token reading literal. Was {literal}."); + } + } + + internal JsonObject ReadObject() + { + reader.Ensure(TokenKind.LeftBrace, "object"); + + reader.Next(); // Read '{' (Object start) + + var jsonObject = new JsonObject(); + + // Read the object's fields until we reach the end of the object ('}') + while (reader.Current.Kind != TokenKind.RightBrace) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read ',' (Seperator) + } + + // Ensure we have a field name + reader.Ensure(TokenKind.String, "Expected field name"); + + var field = ReadField(); + + jsonObject.Add(field.Key, field.Value); + } + + reader.Next(); // Read '}' (Object end) + + return jsonObject; + } + + + // TODO: Use ValueTuple in C#7 + private KeyValuePair ReadField() + { + var fieldName = reader.Current.Value; + + reader.Next(); // Read the field name + + reader.Ensure(TokenKind.Colon, "field"); + + reader.Next(); // Read ':' (Field value indicator) + + return new KeyValuePair(fieldName, ReadFieldValue()); + } + + + internal JsonArray ReadArray() + { + reader.Ensure(TokenKind.LeftBracket, "array"); + + var array = new XNodeArray(); + + reader.Next(); // Read the '[' (Array start) + + // Read the array's items + while (reader.Current.Kind != TokenKind.RightBracket) + { + if (reader.Current.Kind == TokenKind.Comma) + { + reader.Next(); // Read the ',' (Seperator) + } + + if (reader.Current.IsLiteral) + { + array.Add(ReadLiteral()); // Boolean, Date, Number, Null, String, Uri + } + else if (reader.Current.Kind == TokenKind.LeftBracket) + { + array.Add(ReadArray()); // Array + } + else if (reader.Current.Kind == TokenKind.LeftBrace) + { + array.Add(ReadObject()); // Object + } + else + { + throw new ParserException($"Expected comma, literal, or object. Was {reader.Current}."); + } + } + + reader.Next(); // Read the ']' (Array end) + + return array; + } + + #region IDisposable + + public void Dispose() + { + reader.Dispose(); + } + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonToken.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonToken.cs new file mode 100644 index 000000000000..1e63688d0dd1 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonToken.cs @@ -0,0 +1,66 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal enum TokenKind + { + LeftBrace, // { Object start + RightBrace, // } Object end + + LeftBracket, // [ Array start + RightBracket, // ] Array end + + Comma, // , Comma + Colon, // : Value indicator + Dot, // . Access field indicator + Terminator, // \0 Stream terminator + + Boolean = 31, // true or false + Null = 33, // null + Number = 34, // i.e. -1.93, -1, 0, 1, 1.1 + String = 35, // i.e. "text" + + Eof = 50 + } + + internal /* readonly */ struct JsonToken + { + internal static readonly JsonToken BraceOpen = new JsonToken(TokenKind.LeftBrace, "{"); + internal static readonly JsonToken BraceClose = new JsonToken(TokenKind.RightBrace, "}"); + + internal static readonly JsonToken BracketOpen = new JsonToken(TokenKind.LeftBracket, "["); + internal static readonly JsonToken BracketClose = new JsonToken(TokenKind.RightBracket, "]"); + + internal static readonly JsonToken Colon = new JsonToken(TokenKind.Colon, ":"); + internal static readonly JsonToken Comma = new JsonToken(TokenKind.Comma, ","); + internal static readonly JsonToken Terminator = new JsonToken(TokenKind.Terminator, "\0"); + + internal static readonly JsonToken True = new JsonToken(TokenKind.Boolean, "true"); + internal static readonly JsonToken False = new JsonToken(TokenKind.Boolean, "false"); + internal static readonly JsonToken Null = new JsonToken(TokenKind.Null, "null"); + + internal static readonly JsonToken Eof = new JsonToken(TokenKind.Eof, null); + + internal JsonToken(TokenKind kind, string value) + { + Kind = kind; + Value = value; + } + + internal readonly TokenKind Kind; + + internal readonly string Value; + + public override string ToString() => Kind + ": " + Value; + + #region Helpers + + internal bool IsLiteral => (byte)Kind > 30 && (byte)Kind < 40; + + internal bool IsTerminator => Kind == TokenKind.Terminator; + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonTokenizer.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonTokenizer.cs new file mode 100644 index 000000000000..f87d2ce4ea4c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/JsonTokenizer.cs @@ -0,0 +1,177 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Text; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + using System.IO; + + + public class JsonTokenizer : IDisposable + { + private readonly StringBuilder sb = new StringBuilder(); + + private readonly SourceReader reader; + + internal JsonTokenizer(TextReader reader) + : this(new SourceReader(reader)) { } + + internal JsonTokenizer(SourceReader reader) + { + this.reader = reader; + + reader.Next(); // Start with the first char + } + + internal JsonToken ReadNext() + { + reader.SkipWhitespace(); + + if (reader.IsEof) return JsonToken.Eof; + + switch (reader.Current) + { + case '"': return ReadQuotedString(); + + // Symbols + case '[' : reader.Next(); return JsonToken.BracketOpen; // Array start + case ']' : reader.Next(); return JsonToken.BracketClose; // Array end + case ',' : reader.Next(); return JsonToken.Comma; // Value seperator + case ':' : reader.Next(); return JsonToken.Colon; // Field value indicator + case '{' : reader.Next(); return JsonToken.BraceOpen; // Object start + case '}' : reader.Next(); return JsonToken.BraceClose; // Object end + case '\0' : reader.Next(); return JsonToken.Terminator; // Stream terminiator + + default: return ReadLiteral(); + } + } + + private JsonToken ReadQuotedString() + { + Expect('"', "quoted string indicator"); + + reader.Next(); // Read '"' (Starting quote) + + // Read until we reach an unescaped quote char + while (reader.Current != '"') + { + EnsureNotEof("quoted string"); + + if (reader.Current == '\\') + { + char escapedCharacter = reader.ReadEscapeCode(); + + sb.Append(escapedCharacter); + + continue; + } + + StoreCurrentCharacterAndReadNext(); + } + + reader.Next(); // Read '"' (Ending quote) + + return new JsonToken(TokenKind.String, value: sb.Extract()); + } + + private JsonToken ReadLiteral() + { + if (char.IsDigit(reader.Current) || + reader.Current == '-' || + reader.Current == '+') + { + return ReadNumber(); + } + + return ReadIdentifer(); + } + + private JsonToken ReadNumber() + { + // Read until we hit a non-numeric character + // -6.247737e-06 + // E + + while (char.IsDigit(reader.Current) + || reader.Current == '.' + || reader.Current == 'e' + || reader.Current == 'E' + || reader.Current == '-' + || reader.Current == '+') + { + StoreCurrentCharacterAndReadNext(); + } + + return new JsonToken(TokenKind.Number, value: sb.Extract()); + } + + int count = 0; + + private JsonToken ReadIdentifer() + { + count++; + + if (!char.IsLetter(reader.Current)) + { + throw new ParserException( + message : $"Expected literal (number, boolean, or null). Was '{reader.Current}'.", + location : reader.Location + ); + } + + // Read letters, numbers, and underscores '_' + while (char.IsLetterOrDigit(reader.Current) || reader.Current == '_') + { + StoreCurrentCharacterAndReadNext(); + } + + string text = sb.Extract(); + + switch (text) + { + case "true": return JsonToken.True; + case "false": return JsonToken.False; + case "null": return JsonToken.Null; + + default: return new JsonToken(TokenKind.String, text); + } + } + + private void Expect(char character, string description) + { + if (reader.Current != character) + { + throw new ParserException( + message: $"Expected {description} ('{character}'). Was '{reader.Current}'.", + location: reader.Location + ); + } + } + + private void EnsureNotEof(string tokenType) + { + if (reader.IsEof) + { + throw new ParserException( + message: $"Unexpected EOF while reading {tokenType}.", + location: reader.Location + ); + } + } + + private void StoreCurrentCharacterAndReadNext() + { + sb.Append(reader.Current); + + reader.Next(); + } + + public void Dispose() + { + reader.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Location.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Location.cs new file mode 100644 index 000000000000..be36118edffb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Location.cs @@ -0,0 +1,43 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal struct SourceLocation + { + private int line; + private int column; + private int position; + + internal SourceLocation(int line = 0, int column = 0, int position = 0) + { + this.line = line; + this.column = column; + this.position = position; + } + + internal int Line => line; + + internal int Column => column; + + internal int Position => position; + + internal void Advance() + { + this.column++; + this.position++; + } + + internal void MarkNewLine() + { + this.line++; + this.column = 0; + } + + internal SourceLocation Clone() + { + return new SourceLocation(line, column, position); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Readers/SourceReader.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Readers/SourceReader.cs new file mode 100644 index 000000000000..6e9083b12024 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/Readers/SourceReader.cs @@ -0,0 +1,130 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Globalization; +using System.IO; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public sealed class SourceReader : IDisposable + { + private readonly TextReader source; + + private char current; + + private readonly SourceLocation location = new SourceLocation(); + + private bool isEof = false; + + internal SourceReader(TextReader textReader) + { + this.source = textReader ?? throw new ArgumentNullException(nameof(textReader)); + } + + /// + /// Advances to the next character + /// + internal void Next() + { + // Advance to the new line when we see a new line '\n'. + // A new line may be prefixed by a carriage return '\r'. + + if (current == '\n') + { + location.MarkNewLine(); + } + + int charCode = source.Read(); // -1 for end + + if (charCode >= 0) + { + current = (char)charCode; + } + else + { + // If we've already marked this as the EOF, throw an exception + if (isEof) + { + throw new EndOfStreamException("Cannot advance past end of stream."); + } + + isEof = true; + + current = '\0'; + } + + location.Advance(); + } + + internal void SkipWhitespace() + { + while (char.IsWhiteSpace(current)) + { + Next(); + } + } + + internal char ReadEscapeCode() + { + Next(); + + char escapedChar = current; + + Next(); // Consume escaped character + + switch (escapedChar) + { + // Special escape codes + case '"': return '"'; // " (Quotation mark) U+0022 + case '/': return '/'; // / (Solidus) U+002F + case '\\': return '\\'; // \ (Reverse solidus) U+005C + + // Control Characters + case '0': return '\0'; // Nul (0) U+0000 + case 'a': return '\a'; // Alert (7) + case 'b': return '\b'; // Backspace (8) U+0008 + case 'f': return '\f'; // Form feed (12) U+000C + case 'n': return '\n'; // Line feed (10) U+000A + case 'r': return '\r'; // Carriage return (13) U+000D + case 't': return '\t'; // Horizontal tab (9) U+0009 + case 'v': return '\v'; // Vertical tab + + // Unicode escape sequence + case 'u': return ReadUnicodeEscapeSequence(); // U+XXXX + + default: throw new Exception($"Unrecognized escape sequence '\\{escapedChar}'"); + } + } + + private readonly char[] hexCode = new char[4]; + + private char ReadUnicodeEscapeSequence() + { + hexCode[0] = current; Next(); + hexCode[1] = current; Next(); + hexCode[2] = current; Next(); + hexCode[3] = current; Next(); + + return Convert.ToChar(int.Parse( + s : new string(hexCode), + style : NumberStyles.HexNumber, + provider: NumberFormatInfo.InvariantInfo + )); + } + + internal char Current => current; + + internal bool IsEof => isEof; + + internal char Peek() => (char)source.Peek(); + + internal SourceLocation Location => location; + + public void Dispose() + { + source.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Parser/TokenReader.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/TokenReader.cs new file mode 100644 index 000000000000..c190c2af3d50 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Parser/TokenReader.cs @@ -0,0 +1,39 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + public class TokenReader : IDisposable + { + private readonly JsonTokenizer tokenizer; + private JsonToken current; + + internal TokenReader(JsonTokenizer tokenizer) + { + this.tokenizer = tokenizer ?? throw new ArgumentNullException(nameof(tokenizer)); + } + + internal void Next() + { + current = tokenizer.ReadNext(); + } + + internal JsonToken Current => current; + + internal void Ensure(TokenKind kind, string readerName) + { + if (current.Kind != kind) + { + throw new ParserException($"Expected {kind} while reading {readerName}). Was {current}."); + } + } + + public void Dispose() + { + tokenizer.Dispose(); + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/PipelineMocking.cs b/swaggerci/oracle.DefaultTag/generated/runtime/PipelineMocking.cs new file mode 100644 index 000000000000..0c2f2f0b7a19 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/PipelineMocking.cs @@ -0,0 +1,262 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System.Threading.Tasks; + using System.Collections.Generic; + using System.Net.Http; + using System.Linq; + using System.Net; + using Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json; + + public enum MockMode + { + Live, + Record, + Playback, + + } + + public class PipelineMock + { + + private System.Collections.Generic.Stack scenario = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack context = new System.Collections.Generic.Stack(); + private System.Collections.Generic.Stack description = new System.Collections.Generic.Stack(); + + private readonly string recordingPath; + private int counter = 0; + + public static implicit operator Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep(PipelineMock instance) => instance.SendAsync; + + public MockMode Mode { get; set; } = MockMode.Live; + public PipelineMock(string recordingPath) + { + this.recordingPath = recordingPath; + } + + public void PushContext(string text) => context.Push(text); + + public void PushDescription(string text) => description.Push(text); + + + public void PushScenario(string it) + { + // reset counter too + counter = 0; + + scenario.Push(it); + } + + public void PopContext() => context.Pop(); + + public void PopDescription() => description.Pop(); + + public void PopScenario() => scenario.Pop(); + + public void SetRecord() => Mode = MockMode.Record; + + public void SetPlayback() => Mode = MockMode.Playback; + + public void SetLive() => Mode = MockMode.Live; + + public string Scenario => (scenario.Count > 0 ? scenario.Peek() : "[NoScenario]"); + public string Description => (description.Count > 0 ? description.Peek() : "[NoDescription]"); + public string Context => (context.Count > 0 ? context.Peek() : "[NoContext]"); + + /// + /// Headers that we substitute out blank values for in the recordings + /// Add additional headers as necessary + /// + public static HashSet Blacklist = new HashSet(System.StringComparer.CurrentCultureIgnoreCase) { + "Authorization", + }; + + public Dictionary ForceResponseHeaders = new Dictionary(); + + internal static XImmutableArray Removed = new XImmutableArray(new string[] { "[Filtered]" }); + + internal static IEnumerable> FilterHeaders(IEnumerable>> headers) => headers.Select(header => new KeyValuePair(header.Key, Blacklist.Contains(header.Key) ? Removed : new XImmutableArray(header.Value.ToArray()))); + + internal static JsonNode SerializeContent(HttpContent content, ref bool isBase64) => content == null ? XNull.Instance : SerializeContent(content.ReadAsByteArrayAsync().Result, ref isBase64); + + internal static JsonNode SerializeContent(byte[] content, ref bool isBase64) + { + if (null == content || content.Length == 0) + { + return XNull.Instance; + } + var first = content[0]; + var last = content[content.Length - 1]; + + // plaintext for JSON/SGML/XML/HTML/STRINGS/ARRAYS + if ((first == '{' && last == '}') || (first == '<' && last == '>') || (first == '[' && last == ']') || (first == '"' && last == '"')) + { + return new JsonString(System.Text.Encoding.UTF8.GetString(content)); + } + + // base64 for everyone else + return new JsonString(System.Convert.ToBase64String(content)); + } + + internal static byte[] DeserializeContent(string content, bool isBase64) + { + if (string.IsNullOrWhiteSpace(content)) + { + return new byte[0]; + } + + if (isBase64) + { + try + { + return System.Convert.FromBase64String(content); + } + catch + { + // hmm. didn't work, return it as a string I guess. + } + } + return System.Text.Encoding.UTF8.GetBytes(content); + } + + public void SaveMessage(string rqKey, HttpRequestMessage request, HttpResponseMessage response) + { + var messages = System.IO.File.Exists(this.recordingPath) ? Load() : new JsonObject() ?? new JsonObject(); + bool isBase64Request = false; + bool isBase64Response = false; + messages[rqKey] = new JsonObject { + { "Request",new JsonObject { + { "Method", request.Method.Method }, + { "RequestUri", request.RequestUri }, + { "Content", SerializeContent( request.Content, ref isBase64Request) }, + { "isContentBase64", isBase64Request }, + { "Headers", new JsonObject(FilterHeaders(request.Headers)) }, + { "ContentHeaders", request.Content == null ? new JsonObject() : new JsonObject(FilterHeaders(request.Content.Headers))} + } }, + {"Response", new JsonObject { + { "StatusCode", (int)response.StatusCode}, + { "Headers", new JsonObject(FilterHeaders(response.Headers))}, + { "ContentHeaders", new JsonObject(FilterHeaders(response.Content.Headers))}, + { "Content", SerializeContent(response.Content, ref isBase64Response) }, + { "isContentBase64", isBase64Response }, + }} + }; + System.IO.File.WriteAllText(this.recordingPath, messages.ToString()); + } + + private JsonObject Load() + { + if (System.IO.File.Exists(this.recordingPath)) + { + try + { + return JsonObject.FromStream(System.IO.File.OpenRead(this.recordingPath)); + } + catch + { + throw new System.Exception($"Invalid recording file: '{recordingPath}'"); + } + } + + throw new System.ArgumentException($"Missing recording file: '{recordingPath}'", nameof(recordingPath)); + } + + public HttpResponseMessage LoadMessage(string rqKey) + { + var responses = Load(); + var message = responses.Property(rqKey); + + if (null == message) + { + throw new System.ArgumentException($"Missing Request '{rqKey}' in recording file", nameof(rqKey)); + } + + var sc = 0; + var reqMessage = message.Property("Request"); + var respMessage = message.Property("Response"); + + // --------------------------- deserialize response ---------------------------------------------------------------- + bool isBase64Response = false; + respMessage.BooleanProperty("isContentBase64", ref isBase64Response); + var response = new HttpResponseMessage + { + StatusCode = (HttpStatusCode)respMessage.NumberProperty("StatusCode", ref sc), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(respMessage.StringProperty("Content"), isBase64Response)) + }; + + foreach (var each in respMessage.Property("Headers")) + { + response.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + foreach (var frh in ForceResponseHeaders) + { + response.Headers.Remove(frh.Key); + response.Headers.TryAddWithoutValidation(frh.Key, frh.Value); + } + + foreach (var each in respMessage.Property("ContentHeaders")) + { + response.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + // --------------------------- deserialize request ---------------------------------------------------------------- + bool isBase64Request = false; + reqMessage.BooleanProperty("isContentBase64", ref isBase64Request); + response.RequestMessage = new HttpRequestMessage + { + Method = new HttpMethod(reqMessage.StringProperty("Method")), + RequestUri = new System.Uri(reqMessage.StringProperty("RequestUri")), + Content = new System.Net.Http.ByteArrayContent(DeserializeContent(reqMessage.StringProperty("Content"), isBase64Request)) + }; + + foreach (var each in reqMessage.Property("Headers")) + { + response.RequestMessage.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + foreach (var each in reqMessage.Property("ContentHeaders")) + { + response.RequestMessage.Content.Headers.TryAddWithoutValidation(each.Key, each.Value.ToArrayOf()); + } + + return response; + } + + public async Task SendAsync(HttpRequestMessage request, IEventListener callback, ISendAsync next) + { + counter++; + var rqkey = $"{Description}+{Context}+{Scenario}+${request.Method.Method}+{request.RequestUri}+{counter}"; + + switch (Mode) + { + case MockMode.Record: + //Add following code since the request.Content will be released after sendAsync + var requestClone = request; + if (requestClone.Content != null) + { + requestClone = await request.CloneWithContent(request.RequestUri, request.Method); + } + // make the call + var response = await next.SendAsync(request, callback); + + // save the message to the recording file + SaveMessage(rqkey, requestClone, response); + + // return the response. + return response; + + case MockMode.Playback: + // load and return the response. + return LoadMessage(rqkey); + + default: + // pass-thru, do nothing + return await next.SendAsync(request, callback); + } + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Properties/Resources.Designer.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Properties/Resources.Designer.cs new file mode 100644 index 000000000000..74fb2d3d4431 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Properties/Resources.Designer.cs @@ -0,0 +1,5655 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.generated.runtime.Properties +{ + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + public class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Resources.ResourceManager ResourceManager + { + get + { + if (object.ReferenceEquals(resourceMan, null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.generated.runtime.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + public static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The remote server returned an error: (401) Unauthorized.. + /// + public static string AccessDeniedExceptionMessage + { + get + { + return ResourceManager.GetString("AccessDeniedExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account id doesn't match one in subscription.. + /// + public static string AccountIdDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("AccountIdDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account needs to be specified. + /// + public static string AccountNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("AccountNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account "{0}" has been added.. + /// + public static string AddAccountAdded + { + get + { + return ResourceManager.GetString("AddAccountAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To switch to a different subscription, please use Select-AzureSubscription.. + /// + public static string AddAccountChangeSubscription + { + get + { + return ResourceManager.GetString("AddAccountChangeSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential".. + /// + public static string AddAccountNonInteractiveGuestOrFpo + { + get + { + return ResourceManager.GetString("AddAccountNonInteractiveGuestOrFpo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription "{0}" is selected as the default subscription.. + /// + public static string AddAccountShowDefaultSubscription + { + get + { + return ResourceManager.GetString("AddAccountShowDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To view all the subscriptions, please use Get-AzureSubscription.. + /// + public static string AddAccountViewSubscriptions + { + get + { + return ResourceManager.GetString("AddAccountViewSubscriptions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is created successfully.. + /// + public static string AddOnCreatedMessage + { + get + { + return ResourceManager.GetString("AddOnCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on name {0} is already used.. + /// + public static string AddOnNameAlreadyUsed + { + get + { + return ResourceManager.GetString("AddOnNameAlreadyUsed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} not found.. + /// + public static string AddOnNotFound + { + get + { + return ResourceManager.GetString("AddOnNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-on {0} is removed successfully.. + /// + public static string AddOnRemovedMessage + { + get + { + return ResourceManager.GetString("AddOnRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-On {0} is updated successfully.. + /// + public static string AddOnUpdatedMessage + { + get + { + return ResourceManager.GetString("AddOnUpdatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}.. + /// + public static string AddRoleMessageCreate + { + get + { + return ResourceManager.GetString("AddRoleMessageCreate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’.. + /// + public static string AddRoleMessageCreateNode + { + get + { + return ResourceManager.GetString("AddRoleMessageCreateNode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure".. + /// + public static string AddRoleMessageCreatePHP + { + get + { + return ResourceManager.GetString("AddRoleMessageCreatePHP", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator. + /// + public static string AddRoleMessageInsufficientPermissions + { + get + { + return ResourceManager.GetString("AddRoleMessageInsufficientPermissions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A role name '{0}' already exists. + /// + public static string AddRoleMessageRoleExists + { + get + { + return ResourceManager.GetString("AddRoleMessageRoleExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} already has an endpoint with name {1}. + /// + public static string AddTrafficManagerEndpointFailed + { + get + { + return ResourceManager.GetString("AddTrafficManagerEndpointFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. + ///Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable [rest of string was truncated]";. + /// + public static string ARMDataCollectionMessage + { + get + { + return ResourceManager.GetString("ARMDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Common.Authentication]: Authenticating for account {0} with single tenant {1}.. + /// + public static string AuthenticatingForSingleTenant + { + get + { + return ResourceManager.GetString("AuthenticatingForSingleTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Windows Azure Powershell\. + /// + public static string AzureDirectory + { + get + { + return ResourceManager.GetString("AzureDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://manage.windowsazure.com. + /// + public static string AzurePortalUrl + { + get + { + return ResourceManager.GetString("AzurePortalUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PORTAL_URL. + /// + public static string AzurePortalUrlEnv + { + get + { + return ResourceManager.GetString("AzurePortalUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Selected profile must not be null.. + /// + public static string AzureProfileMustNotBeNull + { + get + { + return ResourceManager.GetString("AzureProfileMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure SDK\{0}\. + /// + public static string AzureSdkDirectory + { + get + { + return ResourceManager.GetString("AzureSdkDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscArchiveAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscArchiveAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find configuration data file: {0}. + /// + public static string AzureVMDscCannotFindConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscCannotFindConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Create Archive. + /// + public static string AzureVMDscCreateArchiveAction + { + get + { + return ResourceManager.GetString("AzureVMDscCreateArchiveAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The configuration data must be a .psd1 file. + /// + public static string AzureVMDscInvalidConfigurationDataFile + { + get + { + return ResourceManager.GetString("AzureVMDscInvalidConfigurationDataFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Parsing configuration script: {0}. + /// + public static string AzureVMDscParsingConfiguration + { + get + { + return ResourceManager.GetString("AzureVMDscParsingConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it.. + /// + public static string AzureVMDscStorageBlobAlreadyExists + { + get + { + return ResourceManager.GetString("AzureVMDscStorageBlobAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upload '{0}'. + /// + public static string AzureVMDscUploadToBlobStorageAction + { + get + { + return ResourceManager.GetString("AzureVMDscUploadToBlobStorageAction", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Execution failed because a background thread could not prompt the user.. + /// + public static string BaseShouldMethodFailureReason + { + get + { + return ResourceManager.GetString("BaseShouldMethodFailureReason", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Base Uri was empty.. + /// + public static string BaseUriEmpty + { + get + { + return ResourceManager.GetString("BaseUriEmpty", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing without ParameterSet.. + /// + public static string BeginProcessingWithoutParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithoutParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} begin processing with ParameterSet '{1}'.. + /// + public static string BeginProcessingWithParameterSetLog + { + get + { + return ResourceManager.GetString("BeginProcessingWithParameterSetLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Blob with the name {0} already exists in the account.. + /// + public static string BlobAlreadyExistsInTheAccount + { + get + { + return ResourceManager.GetString("BlobAlreadyExistsInTheAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}.blob.core.windows.net/. + /// + public static string BlobEndpointUri + { + get + { + return ResourceManager.GetString("BlobEndpointUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_BLOBSTORAGE_TEMPLATE. + /// + public static string BlobEndpointUriEnv + { + get + { + return ResourceManager.GetString("BlobEndpointUriEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is changing.. + /// + public static string BreakingChangeAttributeParameterChanging + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterChanging", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is becoming mandatory.. + /// + public static string BreakingChangeAttributeParameterMandatoryNow + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterMandatoryNow", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplaced + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplaced", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The parameter : '{0}' is being replaced by mandatory parameter : '{1}'.. + /// + public static string BreakingChangeAttributeParameterReplacedMandatory + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterReplacedMandatory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The type of the parameter is changing from '{0}' to '{1}'.. + /// + public static string BreakingChangeAttributeParameterTypeChange + { + get + { + return ResourceManager.GetString("BreakingChangeAttributeParameterTypeChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Change description : {0} + ///. + /// + public static string BreakingChangesAttributesChangeDescriptionMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesChangeDescriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet is being deprecated. There will be no replacement for it.. + /// + public static string BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesParameterSetDeprecationMessageNoReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet '{0}' is replacing this cmdlet.. + /// + public static string BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetDeprecationMessageWithReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type is changing from the existing type :'{0}' to the new type :'{1}'. + /// + public static string BreakingChangesAttributesCmdLetOutputChange1 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange1", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "The output type '{0}' is changing". + /// + public static string BreakingChangesAttributesCmdLetOutputChange2 + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputChange2", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + ///- The following properties are being added to the output type : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesAdded + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesAdded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to + /// - The following properties in the output type are being deprecated : + ///. + /// + public static string BreakingChangesAttributesCmdLetOutputPropertiesRemoved + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputPropertiesRemoved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The output type '{0}' is being deprecated without a replacement.. + /// + public static string BreakingChangesAttributesCmdLetOutputTypeDeprecated + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesCmdLetOutputTypeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - {0} + /// + ///. + /// + public static string BreakingChangesAttributesDeclarationMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to - Cmdlet : '{0}' + /// - {1} + ///. + /// + public static string BreakingChangesAttributesDeclarationMessageWithCmdletName + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesDeclarationMessageWithCmdletName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to NOTE : Go to {0} for steps to suppress (and other related information on) the breaking change messages.. + /// + public static string BreakingChangesAttributesFooterMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesFooterMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Breaking changes in the cmdlet '{0}' :. + /// + public static string BreakingChangesAttributesHeaderMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesHeaderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note : This change will take effect on '{0}' + ///. + /// + public static string BreakingChangesAttributesInEffectByDateMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByDateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note :The change is expected to take effect from az version : '{0}' + /// + ///. + /// + public static string BreakingChangesAttributesInEffectByAzVersion + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesInEffectByAzVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ```powershell + ///# Old + ///{0} + /// + ///# New + ///{1} + ///``` + /// + ///. + /// + public static string BreakingChangesAttributesUsageChangeMessage + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cmdlet invocation changes : + /// Old Way : {0} + /// New Way : {1}. + /// + public static string BreakingChangesAttributesUsageChangeMessageConsole + { + get + { + return ResourceManager.GetString("BreakingChangesAttributesUsageChangeMessageConsole", resourceCulture); + } + } + + /// + /// The cmdlet is in experimental stage. The function may not be enabled in current subscription. + /// + public static string ExperimentalCmdletMessage + { + get + { + return ResourceManager.GetString("ExperimentalCmdletMessage", resourceCulture); + } + } + + + + /// + /// Looks up a localized string similar to CACHERUNTIMEURL. + /// + public static string CacheRuntimeUrl + { + get + { + return ResourceManager.GetString("CacheRuntimeUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cache. + /// + public static string CacheRuntimeValue + { + get + { + return ResourceManager.GetString("CacheRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to CacheRuntimeVersion. + /// + public static string CacheRuntimeVersionKey + { + get + { + return ResourceManager.GetString("CacheRuntimeVersionKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}). + /// + public static string CacheVersionWarningText + { + get + { + return ResourceManager.GetString("CacheVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot change built-in environment {0}.. + /// + public static string CannotChangeBuiltinEnvironment + { + get + { + return ResourceManager.GetString("CannotChangeBuiltinEnvironment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find {0} with name {1}.. + /// + public static string CannotFind + { + get + { + return ResourceManager.GetString("CannotFind", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment for service {0} with {1} slot doesn't exist. + /// + public static string CannotFindDeployment + { + get + { + return ResourceManager.GetString("CannotFindDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Can't find valid Microsoft Azure role in current directory {0}. + /// + public static string CannotFindRole + { + get + { + return ResourceManager.GetString("CannotFindRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist. + /// + public static string CannotFindServiceConfigurationFile + { + get + { + return ResourceManager.GetString("CannotFindServiceConfigurationFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders.. + /// + public static string CannotFindServiceRoot + { + get + { + return ResourceManager.GetString("CannotFindServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated.. + /// + public static string CannotUpdateUnknownSubscription + { + get + { + return ResourceManager.GetString("CannotUpdateUnknownSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ManagementCertificate. + /// + public static string CertificateElementName + { + get + { + return ResourceManager.GetString("CertificateElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to certificate.pfx. + /// + public static string CertificateFileName + { + get + { + return ResourceManager.GetString("CertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate imported into CurrentUser\My\{0}. + /// + public static string CertificateImportedMessage + { + get + { + return ResourceManager.GetString("CertificateImportedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No certificate was found in the certificate store with thumbprint {0}. + /// + public static string CertificateNotFoundInStore + { + get + { + return ResourceManager.GetString("CertificateNotFoundInStore", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your account does not have access to the private key for certificate {0}. + /// + public static string CertificatePrivateKeyAccessError + { + get + { + return ResourceManager.GetString("CertificatePrivateKeyAccessError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} {1} deployment for {2} service. + /// + public static string ChangeDeploymentStateWaitMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStateWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cloud service {0} is in {1} state.. + /// + public static string ChangeDeploymentStatusCompleteMessage + { + get + { + return ResourceManager.GetString("ChangeDeploymentStatusCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing/Removing public environment '{0}' is not allowed.. + /// + public static string ChangePublicEnvironmentMessage + { + get + { + return ResourceManager.GetString("ChangePublicEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} is set to value {1}. + /// + public static string ChangeSettingsElementMessage + { + get + { + return ResourceManager.GetString("ChangeSettingsElementMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Changing public environment is not supported.. + /// + public static string ChangingDefaultEnvironmentNotSupported + { + get + { + return ResourceManager.GetString("ChangingDefaultEnvironmentNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Choose which publish settings file to use:. + /// + public static string ChoosePublishSettingsFile + { + get + { + return ResourceManager.GetString("ChoosePublishSettingsFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel. + /// + public static string ClientDiagnosticLevelName + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string ClientDiagnosticLevelValue + { + get + { + return ResourceManager.GetString("ClientDiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to cloud_package.cspkg. + /// + public static string CloudPackageFileName + { + get + { + return ResourceManager.GetString("CloudPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Cloud.cscfg. + /// + public static string CloudServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("CloudServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Add-ons for {0}. + /// + public static string CloudServiceDescription + { + get + { + return ResourceManager.GetString("CloudServiceDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive.. + /// + public static string CommunicationCouldNotBeEstablished + { + get + { + return ResourceManager.GetString("CommunicationCouldNotBeEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete. + /// + public static string CompleteMessage + { + get + { + return ResourceManager.GetString("CompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OperationID : '{0}'. + /// + public static string ComputeCloudExceptionOperationIdMessage + { + get + { + return ResourceManager.GetString("ComputeCloudExceptionOperationIdMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to config.json. + /// + public static string ConfigurationFileName + { + get + { + return ResourceManager.GetString("ConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to VirtualMachine creation failed.. + /// + public static string CreateFailedErrorMessage + { + get + { + return ResourceManager.GetString("CreateFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead.. + /// + public static string CreateWebsiteFailed + { + get + { + return ResourceManager.GetString("CreateWebsiteFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core. + /// + public static string DataCacheClientsType + { + get + { + return ResourceManager.GetString("DataCacheClientsType", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //blobcontainer[@datacenter='{0}']. + /// + public static string DatacenterBlobQuery + { + get + { + return ResourceManager.GetString("DatacenterBlobQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure PowerShell Data Collection Confirmation. + /// + public static string DataCollectionActivity + { + get + { + return ResourceManager.GetString("DataCollectionActivity", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose not to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmNo + { + get + { + return ResourceManager.GetString("DataCollectionConfirmNo", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This confirmation message will be dismissed in '{0}' second(s).... + /// + public static string DataCollectionConfirmTime + { + get + { + return ResourceManager.GetString("DataCollectionConfirmTime", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You choose to participate in Microsoft Azure PowerShell data collection.. + /// + public static string DataCollectionConfirmYes + { + get + { + return ResourceManager.GetString("DataCollectionConfirmYes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The setting profile has been saved to the following path '{0}'.. + /// + public static string DataCollectionSaveFileInformation + { + get + { + return ResourceManager.GetString("DataCollectionSaveFileInformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription. + /// + public static string DefaultAndCurrentSubscription + { + get + { + return ResourceManager.GetString("DefaultAndCurrentSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to none. + /// + public static string DefaultFileVersion + { + get + { + return ResourceManager.GetString("DefaultFileVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There are no hostnames which could be used for validation.. + /// + public static string DefaultHostnamesValidation + { + get + { + return ResourceManager.GetString("DefaultHostnamesValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 8080. + /// + public static string DefaultPort + { + get + { + return ResourceManager.GetString("DefaultPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string DefaultRoleCachingInMB + { + get + { + return ResourceManager.GetString("DefaultRoleCachingInMB", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Auto. + /// + public static string DefaultUpgradeMode + { + get + { + return ResourceManager.GetString("DefaultUpgradeMode", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 80. + /// + public static string DefaultWebPort + { + get + { + return ResourceManager.GetString("DefaultWebPort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Delete. + /// + public static string Delete + { + get + { + return ResourceManager.GetString("Delete", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for service {1} is already in {2} state. + /// + public static string DeploymentAlreadyInState + { + get + { + return ResourceManager.GetString("DeploymentAlreadyInState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment in {0} slot for service {1} is removed. + /// + public static string DeploymentRemovedMessage + { + get + { + return ResourceManager.GetString("DeploymentRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel. + /// + public static string DiagnosticLevelName + { + get + { + return ResourceManager.GetString("DiagnosticLevelName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1. + /// + public static string DiagnosticLevelValue + { + get + { + return ResourceManager.GetString("DiagnosticLevelValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The key to add already exists in the dictionary.. + /// + public static string DictionaryAddAlreadyContainsKey + { + get + { + return ResourceManager.GetString("DictionaryAddAlreadyContainsKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The array index cannot be less than zero.. + /// + public static string DictionaryCopyToArrayIndexLessThanZero + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayIndexLessThanZero", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The supplied array does not have enough room to contain the copied elements.. + /// + public static string DictionaryCopyToArrayTooShort + { + get + { + return ResourceManager.GetString("DictionaryCopyToArrayTooShort", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided dns {0} doesn't exist. + /// + public static string DnsDoesNotExist + { + get + { + return ResourceManager.GetString("DnsDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft Azure Certificate. + /// + public static string EnableRemoteDesktop_FriendlyCertificateName + { + get + { + return ResourceManager.GetString("EnableRemoteDesktop_FriendlyCertificateName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Endpoint can't be retrieved for storage account. + /// + public static string EndPointNotFoundForBlobStorage + { + get + { + return ResourceManager.GetString("EndPointNotFoundForBlobStorage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} end processing.. + /// + public static string EndProcessingLog + { + get + { + return ResourceManager.GetString("EndProcessingLog", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet.. + /// + public static string EnvironmentDoesNotSupportActiveDirectory + { + get + { + return ResourceManager.GetString("EnvironmentDoesNotSupportActiveDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment '{0}' already exists.. + /// + public static string EnvironmentExists + { + get + { + return ResourceManager.GetString("EnvironmentExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name doesn't match one in subscription.. + /// + public static string EnvironmentNameDoesntMatchSubscription + { + get + { + return ResourceManager.GetString("EnvironmentNameDoesntMatchSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment name needs to be specified.. + /// + public static string EnvironmentNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Environment needs to be specified.. + /// + public static string EnvironmentNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("EnvironmentNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The environment name '{0}' is not found.. + /// + public static string EnvironmentNotFound + { + get + { + return ResourceManager.GetString("EnvironmentNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to environments.xml. + /// + public static string EnvironmentsFileName + { + get + { + return ResourceManager.GetString("EnvironmentsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error creating VirtualMachine. + /// + public static string ErrorCreatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorCreatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to download available runtimes for location '{0}'. + /// + public static string ErrorRetrievingRuntimesForLocation + { + get + { + return ResourceManager.GetString("ErrorRetrievingRuntimesForLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Error updating VirtualMachine. + /// + public static string ErrorUpdatingVirtualMachine + { + get + { + return ResourceManager.GetString("ErrorUpdatingVirtualMachine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} failed. Error: {1}, ExceptionDetails: {2}. + /// + public static string FailedJobErrorMessage + { + get + { + return ResourceManager.GetString("FailedJobErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File path is not valid.. + /// + public static string FilePathIsNotValid + { + get + { + return ResourceManager.GetString("FilePathIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The HTTP request was forbidden with client authentication scheme 'Anonymous'.. + /// + public static string FirstPurchaseErrorMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell.. + /// + public static string FirstPurchaseMessage + { + get + { + return ResourceManager.GetString("FirstPurchaseMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation Status:. + /// + public static string GatewayOperationStatus + { + get + { + return ResourceManager.GetString("GatewayOperationStatus", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\General. + /// + public static string GeneralScaffolding + { + get + { + return ResourceManager.GetString("GeneralScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Getting all available Microsoft Azure Add-Ons, this may take few minutes.... + /// + public static string GetAllAddOnsWaitMessage + { + get + { + return ResourceManager.GetString("GetAllAddOnsWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Name{0}Primary Key{0}Seconday Key. + /// + public static string GetStorageKeysHeader + { + get + { + return ResourceManager.GetString("GetStorageKeysHeader", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Git not found. Please install git and place it in your command line path.. + /// + public static string GitNotFound + { + get + { + return ResourceManager.GetString("GitNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not find publish settings. Please run Import-AzurePublishSettingsFile.. + /// + public static string GlobalSettingsManager_Load_PublishSettingsNotFound + { + get + { + return ResourceManager.GetString("GlobalSettingsManager_Load_PublishSettingsNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg end element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoEndWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoEndWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WadCfg start element in the config is not matching the end element.. + /// + public static string IaasDiagnosticsBadConfigNoMatchingWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoMatchingWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find the WadCfg element in the config.. + /// + public static string IaasDiagnosticsBadConfigNoWadCfg + { + get + { + return ResourceManager.GetString("IaasDiagnosticsBadConfigNoWadCfg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode.dll. + /// + public static string IISNodeDll + { + get + { + return ResourceManager.GetString("IISNodeDll", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeEngineKey + { + get + { + return ResourceManager.GetString("IISNodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode-dev\\release\\x64. + /// + public static string IISNodePath + { + get + { + return ResourceManager.GetString("IISNodePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to iisnode. + /// + public static string IISNodeRuntimeValue + { + get + { + return ResourceManager.GetString("IISNodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}). + /// + public static string IISNodeVersionWarningText + { + get + { + return ResourceManager.GetString("IISNodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Illegal characters in path.. + /// + public static string IllegalPath + { + get + { + return ResourceManager.GetString("IllegalPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. + /// + public static string InternalServerErrorMessage + { + get + { + return ResourceManager.GetString("InternalServerErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot enable memcach protocol on a cache worker role {0}.. + /// + public static string InvalidCacheRoleName + { + get + { + return ResourceManager.GetString("InvalidCacheRoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings. + /// + public static string InvalidCertificate + { + get + { + return ResourceManager.GetString("InvalidCertificate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid certificate format.. + /// + public static string InvalidCertificateSingle + { + get + { + return ResourceManager.GetString("InvalidCertificateSingle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided configuration path is invalid or doesn't exist. + /// + public static string InvalidConfigPath + { + get + { + return ResourceManager.GetString("InvalidConfigPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2.. + /// + public static string InvalidCountryNameMessage + { + get + { + return ResourceManager.GetString("InvalidCountryNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription.. + /// + public static string InvalidDefaultSubscription + { + get + { + return ResourceManager.GetString("InvalidDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deployment with {0} does not exist. + /// + public static string InvalidDeployment + { + get + { + return ResourceManager.GetString("InvalidDeployment", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production".. + /// + public static string InvalidDeploymentSlot + { + get + { + return ResourceManager.GetString("InvalidDeploymentSlot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "{0}" is an invalid DNS name for {1}. + /// + public static string InvalidDnsName + { + get + { + return ResourceManager.GetString("InvalidDnsName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid service endpoint.. + /// + public static string InvalidEndpoint + { + get + { + return ResourceManager.GetString("InvalidEndpoint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided file in {0} must be have {1} extension. + /// + public static string InvalidFileExtension + { + get + { + return ResourceManager.GetString("InvalidFileExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to File {0} has invalid characters. + /// + public static string InvalidFileName + { + get + { + return ResourceManager.GetString("InvalidFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your git publishing credentials using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. On the left side open "Web Sites" + ///2. Click on any website + ///3. Choose "Setup Git Publishing" or "Reset deployment credentials" + ///4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username}. + /// + public static string InvalidGitCredentials + { + get + { + return ResourceManager.GetString("InvalidGitCredentials", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The value {0} provided is not a valid GUID. Please provide a valid GUID.. + /// + public static string InvalidGuid + { + get + { + return ResourceManager.GetString("InvalidGuid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified hostname does not exist. Please specify a valid hostname for the site.. + /// + public static string InvalidHostnameValidation + { + get + { + return ResourceManager.GetString("InvalidHostnameValidation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances must be greater than or equal 0 and less than or equal 20. + /// + public static string InvalidInstancesCount + { + get + { + return ResourceManager.GetString("InvalidInstancesCount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file.. + /// + public static string InvalidJobFile + { + get + { + return ResourceManager.GetString("InvalidJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Could not download a valid runtime manifest, Please check your internet connection and try again.. + /// + public static string InvalidManifestError + { + get + { + return ResourceManager.GetString("InvalidManifestError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The account {0} was not found. Please specify a valid account name.. + /// + public static string InvalidMediaServicesAccount + { + get + { + return ResourceManager.GetString("InvalidMediaServicesAccount", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided name "{0}" does not match the service bus namespace naming rules.. + /// + public static string InvalidNamespaceName + { + get + { + return ResourceManager.GetString("InvalidNamespaceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path must specify a valid path to an Azure profile.. + /// + public static string InvalidNewProfilePath + { + get + { + return ResourceManager.GetString("InvalidNewProfilePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Value cannot be null. Parameter name: '{0}'. + /// + public static string InvalidNullArgument + { + get + { + return ResourceManager.GetString("InvalidNullArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is invalid or empty. + /// + public static string InvalidOrEmptyArgumentMessage + { + get + { + return ResourceManager.GetString("InvalidOrEmptyArgumentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided package path is invalid or doesn't exist. + /// + public static string InvalidPackagePath + { + get + { + return ResourceManager.GetString("InvalidPackagePath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' is an invalid parameter set name.. + /// + public static string InvalidParameterSetName + { + get + { + return ResourceManager.GetString("InvalidParameterSetName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} doesn't exist in {1} or you've not passed valid value for it. + /// + public static string InvalidPath + { + get + { + return ResourceManager.GetString("InvalidPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} has invalid characters. + /// + public static string InvalidPathName + { + get + { + return ResourceManager.GetString("InvalidPathName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token}. + /// + public static string InvalidProfileProperties + { + get + { + return ResourceManager.GetString("InvalidProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile. + /// + public static string InvalidPublishSettingsSchema + { + get + { + return ResourceManager.GetString("InvalidPublishSettingsSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name "{0}" has invalid characters. + /// + public static string InvalidRoleNameMessage + { + get + { + return ResourceManager.GetString("InvalidRoleNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid name for the service root folder is required. + /// + public static string InvalidRootNameMessage + { + get + { + return ResourceManager.GetString("InvalidRootNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} is not a recognized runtime type. + /// + public static string InvalidRuntimeError + { + get + { + return ResourceManager.GetString("InvalidRuntimeError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid language is required. + /// + public static string InvalidScaffoldingLanguageArg + { + get + { + return ResourceManager.GetString("InvalidScaffoldingLanguageArg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscription is currently selected. Use Select-Subscription to activate a subscription.. + /// + public static string InvalidSelectedSubscription + { + get + { + return ResourceManager.GetString("InvalidSelectedSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations.. + /// + public static string InvalidServiceBusLocation + { + get + { + return ResourceManager.GetString("InvalidServiceBusLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide a service name or run this command from inside a service project directory.. + /// + public static string InvalidServiceName + { + get + { + return ResourceManager.GetString("InvalidServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must provide valid value for {0}. + /// + public static string InvalidServiceSettingElement + { + get + { + return ResourceManager.GetString("InvalidServiceSettingElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to settings.json is invalid or doesn't exist. + /// + public static string InvalidServiceSettingMessage + { + get + { + return ResourceManager.GetString("InvalidServiceSettingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data.. + /// + public static string InvalidSubscription + { + get + { + return ResourceManager.GetString("InvalidSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscription id {0} is not valid. + /// + public static string InvalidSubscriptionId + { + get + { + return ResourceManager.GetString("InvalidSubscriptionId", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Must specify a non-null subscription name.. + /// + public static string InvalidSubscriptionName + { + get + { + return ResourceManager.GetString("InvalidSubscriptionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet. + /// + public static string InvalidSubscriptionNameMessage + { + get + { + return ResourceManager.GetString("InvalidSubscriptionNameMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided subscriptions file {0} has invalid content.. + /// + public static string InvalidSubscriptionsDataSchema + { + get + { + return ResourceManager.GetString("InvalidSubscriptionsDataSchema", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge.. + /// + public static string InvalidVMSize + { + get + { + return ResourceManager.GetString("InvalidVMSize", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The web job file must have *.zip extension. + /// + public static string InvalidWebJobFile + { + get + { + return ResourceManager.GetString("InvalidWebJobFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Singleton option works for continuous jobs only.. + /// + public static string InvalidWebJobSingleton + { + get + { + return ResourceManager.GetString("InvalidWebJobSingleton", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The website {0} was not found. Please specify a valid website name.. + /// + public static string InvalidWebsite + { + get + { + return ResourceManager.GetString("InvalidWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No job for id: {0} was found.. + /// + public static string JobNotFound + { + get + { + return ResourceManager.GetString("JobNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to engines. + /// + public static string JsonEnginesSectionName + { + get + { + return ResourceManager.GetString("JsonEnginesSectionName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Scaffolding for this language is not yet supported. + /// + public static string LanguageScaffoldingIsNotSupported + { + get + { + return ResourceManager.GetString("LanguageScaffoldingIsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Link already established. + /// + public static string LinkAlreadyEstablished + { + get + { + return ResourceManager.GetString("LinkAlreadyEstablished", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to local_package.csx. + /// + public static string LocalPackageFileName + { + get + { + return ResourceManager.GetString("LocalPackageFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceConfiguration.Local.cscfg. + /// + public static string LocalServiceConfigurationFileName + { + get + { + return ResourceManager.GetString("LocalServiceConfigurationFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for {0} deployment for {1} cloud service.... + /// + public static string LookingForDeploymentMessage + { + get + { + return ResourceManager.GetString("LookingForDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Looking for cloud service {0}.... + /// + public static string LookingForServiceMessage + { + get + { + return ResourceManager.GetString("LookingForServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure Long-Running Job. + /// + public static string LROJobName + { + get + { + return ResourceManager.GetString("LROJobName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter.. + /// + public static string LROTaskExceptionMessage + { + get + { + return ResourceManager.GetString("LROTaskExceptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to managementCertificate.pem. + /// + public static string ManagementCertificateFileName + { + get + { + return ResourceManager.GetString("ManagementCertificateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ?whr={0}. + /// + public static string ManagementPortalRealmFormat + { + get + { + return ResourceManager.GetString("ManagementPortalRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to //baseuri. + /// + public static string ManifestBaseUriQuery + { + get + { + return ResourceManager.GetString("ManifestBaseUriQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to uri. + /// + public static string ManifestBlobUriKey + { + get + { + return ResourceManager.GetString("ManifestBlobUriKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml. + /// + public static string ManifestUri + { + get + { + return ResourceManager.GetString("ManifestUri", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'.. + /// + public static string MissingCertificateInProfileProperties + { + get + { + return ResourceManager.GetString("MissingCertificateInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'.. + /// + public static string MissingPasswordInProfileProperties + { + get + { + return ResourceManager.GetString("MissingPasswordInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Property bag Hashtable must contain a 'SubscriptionId'.. + /// + public static string MissingSubscriptionInProfileProperties + { + get + { + return ResourceManager.GetString("MissingSubscriptionInProfileProperties", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple Add-Ons found holding name {0}. + /// + public static string MultipleAddOnsFoundMessage + { + get + { + return ResourceManager.GetString("MultipleAddOnsFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername.. + /// + public static string MultiplePublishingUsernames + { + get + { + return ResourceManager.GetString("MultiplePublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The first publish settings file "{0}" is used. If you want to use another file specify the file name.. + /// + public static string MultiplePublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("MultiplePublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Plugins.Caching.NamedCaches. + /// + public static string NamedCacheSettingName + { + get + { + return ResourceManager.GetString("NamedCacheSettingName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]}. + /// + public static string NamedCacheSettingValue + { + get + { + return ResourceManager.GetString("NamedCacheSettingValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A publishing username is required. Please specify one using the argument PublishingUsername.. + /// + public static string NeedPublishingUsernames + { + get + { + return ResourceManager.GetString("NeedPublishingUsernames", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to New Add-On Confirmation. + /// + public static string NewAddOnConformation + { + get + { + return ResourceManager.GetString("NewAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string NewMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names.. + /// + public static string NewNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("NewNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at {0} and (c) agree to sharing my contact information with {2}.. + /// + public static string NewNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("NewNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service has been created at {0}. + /// + public static string NewServiceCreatedMessage + { + get + { + return ResourceManager.GetString("NewServiceCreatedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No. + /// + public static string No + { + get + { + return ResourceManager.GetString("No", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription.. + /// + public static string NoCachedToken + { + get + { + return ResourceManager.GetString("NoCachedToken", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole.. + /// + public static string NoCacheWorkerRoles + { + get + { + return ResourceManager.GetString("NoCacheWorkerRoles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No clouds available. + /// + public static string NoCloudsAvailable + { + get + { + return ResourceManager.GetString("NoCloudsAvailable", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "There is no current context, please log in using Connect-AzAccount.". + /// + public static string NoCurrentContextForDataCmdlet + { + get + { + return ResourceManager.GetString("NoCurrentContextForDataCmdlet", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeDirectory + { + get + { + return ResourceManager.GetString("NodeDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeEngineKey + { + get + { + return ResourceManager.GetString("NodeEngineKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node.exe. + /// + public static string NodeExe + { + get + { + return ResourceManager.GetString("NodeExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name>. + /// + public static string NoDefaultSubscriptionMessage + { + get + { + return ResourceManager.GetString("NoDefaultSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft SDKs\Azure\Nodejs\Nov2011. + /// + public static string NodeModulesPath + { + get + { + return ResourceManager.GetString("NodeModulesPath", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to nodejs. + /// + public static string NodeProgramFilesFolderName + { + get + { + return ResourceManager.GetString("NodeProgramFilesFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to node. + /// + public static string NodeRuntimeValue + { + get + { + return ResourceManager.GetString("NodeRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\Node. + /// + public static string NodeScaffolding + { + get + { + return ResourceManager.GetString("NodeScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node. + /// + public static string NodeScaffoldingResources + { + get + { + return ResourceManager.GetString("NodeScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}). + /// + public static string NodeVersionWarningText + { + get + { + return ResourceManager.GetString("NodeVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No, I do not agree. + /// + public static string NoHint + { + get + { + return ResourceManager.GetString("NoHint", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please connect to internet before executing this cmdlet. + /// + public static string NoInternetConnection + { + get + { + return ResourceManager.GetString("NoInternetConnection", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to <NONE>. + /// + public static string None + { + get + { + return ResourceManager.GetString("None", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No publish settings files with extension *.publishsettings are found in the directory "{0}".. + /// + public static string NoPublishSettingsFilesFoundMessage + { + get + { + return ResourceManager.GetString("NoPublishSettingsFilesFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to There is no subscription associated with account {0}.. + /// + public static string NoSubscriptionAddedMessage + { + get + { + return ResourceManager.GetString("NoSubscriptionAddedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount?. + /// + public static string NoSubscriptionFoundForTenant + { + get + { + return ResourceManager.GetString("NoSubscriptionFoundForTenant", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration.. + /// + public static string NotCacheWorkerRole + { + get + { + return ResourceManager.GetString("NotCacheWorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Certificate can't be null.. + /// + public static string NullCertificateMessage + { + get + { + return ResourceManager.GetString("NullCertificateMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} could not be null or empty. + /// + public static string NullObjectMessage + { + get + { + return ResourceManager.GetString("NullObjectMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add a null RoleSettings to {0}. + /// + public static string NullRoleSettingsMessage + { + get + { + return ResourceManager.GetString("NullRoleSettingsMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to add new role to null service definition. + /// + public static string NullServiceDefinitionMessage + { + get + { + return ResourceManager.GetString("NullServiceDefinitionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The request offer '{0}' is not found.. + /// + public static string OfferNotFoundMessage + { + get + { + return ResourceManager.GetString("OfferNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Operation "{0}" failed on VM with ID: {1}. + /// + public static string OperationFailedErrorMessage + { + get + { + return ResourceManager.GetString("OperationFailedErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The REST operation failed with message '{0}' and error code '{1}'. + /// + public static string OperationFailedMessage + { + get + { + return ResourceManager.GetString("OperationFailedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state.. + /// + public static string OperationTimedOutOrError + { + get + { + return ResourceManager.GetString("OperationTimedOutOrError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package. + /// + public static string Package + { + get + { + return ResourceManager.GetString("Package", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Package is created at service root path {0}.. + /// + public static string PackageCreated + { + get + { + return ResourceManager.GetString("PackageCreated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {{ + /// "author": "", + /// + /// "name": "{0}", + /// "version": "0.0.0", + /// "dependencies":{{}}, + /// "devDependencies":{{}}, + /// "optionalDependencies": {{}}, + /// "engines": {{ + /// "node": "*", + /// "iisnode": "*" + /// }} + /// + ///}} + ///. + /// + public static string PackageJsonDefaultFile + { + get + { + return ResourceManager.GetString("PackageJsonDefaultFile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to package.json. + /// + public static string PackageJsonFileName + { + get + { + return ResourceManager.GetString("PackageJsonFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path {0} doesn't exist.. + /// + public static string PathDoesNotExist + { + get + { + return ResourceManager.GetString("PathDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path for {0} doesn't exist in {1}.. + /// + public static string PathDoesNotExistForElement + { + get + { + return ResourceManager.GetString("PathDoesNotExistForElement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Peer Asn has to be provided.. + /// + public static string PeerAsnRequired + { + get + { + return ResourceManager.GetString("PeerAsnRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 5.4.0. + /// + public static string PHPDefaultRuntimeVersion + { + get + { + return ResourceManager.GetString("PHPDefaultRuntimeVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to php. + /// + public static string PhpRuntimeValue + { + get + { + return ResourceManager.GetString("PhpRuntimeValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resources\Scaffolding\PHP. + /// + public static string PHPScaffolding + { + get + { + return ResourceManager.GetString("PHPScaffolding", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP. + /// + public static string PHPScaffoldingResources + { + get + { + return ResourceManager.GetString("PHPScaffoldingResources", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}). + /// + public static string PHPVersionWarningText + { + get + { + return ResourceManager.GetString("PHPVersionWarningText", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to You must create your first web site using the Microsoft Azure portal. + ///Please follow these steps in the portal: + ///1. At the bottom of the page, click on New > Web Site > Quick Create + ///2. Type {0} in the URL field + ///3. Click on "Create Web Site" + ///4. Once the site has been created, click on the site name + ///5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create.. + /// + public static string PortalInstructions + { + get + { + return ResourceManager.GetString("PortalInstructions", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git". + /// + public static string PortalInstructionsGit + { + get + { + return ResourceManager.GetString("PortalInstructionsGit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The estimated generally available date is '{0}'.. + /// + public static string PreviewCmdletETAMessage { + get { + return ResourceManager.GetString("PreviewCmdletETAMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to This cmdlet is in preview. Its behavior is subject to change based on customer feedback.. + /// + public static string PreviewCmdletMessage + { + get + { + return ResourceManager.GetString("PreviewCmdletMessage", resourceCulture); + } + } + + + /// + /// Looks up a localized string similar to A value for the Primary Peer Subnet has to be provided.. + /// + public static string PrimaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("PrimaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Promotion code can be used only when updating to a new plan.. + /// + public static string PromotionCodeWithCurrentPlanMessage + { + get + { + return ResourceManager.GetString("PromotionCodeWithCurrentPlanMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service not published at user request.. + /// + public static string PublishAbortedAtUserRequest + { + get + { + return ResourceManager.GetString("PublishAbortedAtUserRequest", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Complete.. + /// + public static string PublishCompleteMessage + { + get + { + return ResourceManager.GetString("PublishCompleteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Connecting.... + /// + public static string PublishConnectingMessage + { + get + { + return ResourceManager.GetString("PublishConnectingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Deployment ID: {0}.. + /// + public static string PublishCreatedDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishCreatedDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created hosted service '{0}'.. + /// + public static string PublishCreatedServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatedServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Created Website URL: {0}.. + /// + public static string PublishCreatedWebsiteMessage + { + get + { + return ResourceManager.GetString("PublishCreatedWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Creating.... + /// + public static string PublishCreatingServiceMessage + { + get + { + return ResourceManager.GetString("PublishCreatingServiceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Initializing.... + /// + public static string PublishInitializingMessage + { + get + { + return ResourceManager.GetString("PublishInitializingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to busy. + /// + public static string PublishInstanceStatusBusy + { + get + { + return ResourceManager.GetString("PublishInstanceStatusBusy", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to creating the virtual machine. + /// + public static string PublishInstanceStatusCreating + { + get + { + return ResourceManager.GetString("PublishInstanceStatusCreating", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Instance {0} of role {1} is {2}.. + /// + public static string PublishInstanceStatusMessage + { + get + { + return ResourceManager.GetString("PublishInstanceStatusMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ready. + /// + public static string PublishInstanceStatusReady + { + get + { + return ResourceManager.GetString("PublishInstanceStatusReady", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing deployment for {0} with Subscription ID: {1}.... + /// + public static string PublishPreparingDeploymentMessage + { + get + { + return ResourceManager.GetString("PublishPreparingDeploymentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publishing {0} to Microsoft Azure. This may take several minutes.... + /// + public static string PublishServiceStartMessage + { + get + { + return ResourceManager.GetString("PublishServiceStartMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publish settings. + /// + public static string PublishSettings + { + get + { + return ResourceManager.GetString("PublishSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure. + /// + public static string PublishSettingsElementName + { + get + { + return ResourceManager.GetString("PublishSettingsElementName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to .PublishSettings. + /// + public static string PublishSettingsFileExtention + { + get + { + return ResourceManager.GetString("PublishSettingsFileExtention", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to publishSettings.xml. + /// + public static string PublishSettingsFileName + { + get + { + return ResourceManager.GetString("PublishSettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to &whr={0}. + /// + public static string PublishSettingsFileRealmFormat + { + get + { + return ResourceManager.GetString("PublishSettingsFileRealmFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Publish settings imported. + /// + public static string PublishSettingsSetSuccessfully + { + get + { + return ResourceManager.GetString("PublishSettingsSetSuccessfully", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AZURE_PUBLISHINGPROFILE_URL. + /// + public static string PublishSettingsUrlEnv + { + get + { + return ResourceManager.GetString("PublishSettingsUrlEnv", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting.... + /// + public static string PublishStartingMessage + { + get + { + return ResourceManager.GetString("PublishStartingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Upgrading.... + /// + public static string PublishUpgradingMessage + { + get + { + return ResourceManager.GetString("PublishUpgradingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Uploading Package to storage service {0}.... + /// + public static string PublishUploadingPackageMessage + { + get + { + return ResourceManager.GetString("PublishUploadingPackageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Verifying storage account '{0}'.... + /// + public static string PublishVerifyingStorageMessage + { + get + { + return ResourceManager.GetString("PublishVerifyingStorageMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionAdditionalContentPathNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionAdditionalContentPathNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration published to {0}. + /// + public static string PublishVMDscExtensionArchiveUploadedMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionArchiveUploadedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyFileVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyFileVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Copy the module '{0}' to '{1}'.. + /// + public static string PublishVMDscExtensionCopyModuleVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCopyModuleVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1).. + /// + public static string PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionCreateArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleted '{0}'. + /// + public static string PublishVMDscExtensionDeletedFileMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeletedFileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot delete '{0}': {1}. + /// + public static string PublishVMDscExtensionDeleteErrorMessage + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDeleteErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Path '{0}' not found.. + /// + public static string PublishVMDscExtensionDirectoryNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionDirectoryNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot get module for DscResource '{0}'. Possible solutions: + ///1) Specify -ModuleName for Import-DscResource in your configuration. + ///2) Unblock module that contains resource. + ///3) Move Import-DscResource inside Node block. + ///. + /// + public static string PublishVMDscExtensionGetDscResourceFailed + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionGetDscResourceFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to List of required modules: [{0}].. + /// + public static string PublishVMDscExtensionRequiredModulesVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredModulesVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version.. + /// + public static string PublishVMDscExtensionRequiredPsVersion + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionRequiredPsVersion", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration script '{0}' contained parse errors: + ///{1}. + /// + public static string PublishVMDscExtensionStorageParserErrors + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionStorageParserErrors", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Temp folder '{0}' created.. + /// + public static string PublishVMDscExtensionTempFolderVerbose + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionTempFolderVerbose", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid configuration file: {0}. + ///The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip).. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileInvalidExtension", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Configuration file '{0}' not found.. + /// + public static string PublishVMDscExtensionUploadArchiveConfigFileNotExist + { + get + { + return ResourceManager.GetString("PublishVMDscExtensionUploadArchiveConfigFileNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Azure PowerShell collects usage data in order to improve your experience. + ///The data is anonymous and does not include commandline argument values. + ///The data is collected by Microsoft. + /// + ///Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. + ///Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enab [rest of string was truncated]";. + /// + public static string RDFEDataCollectionMessage + { + get + { + return ResourceManager.GetString("RDFEDataCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Replace current deployment with '{0}' Id ?. + /// + public static string RedeployCommit + { + get + { + return ResourceManager.GetString("RedeployCommit", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to regenerate key?. + /// + public static string RegenerateKeyWarning + { + get + { + return ResourceManager.GetString("RegenerateKeyWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Generate new key.. + /// + public static string RegenerateKeyWhatIfMessage + { + get + { + return ResourceManager.GetString("RegenerateKeyWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove account '{0}'?. + /// + public static string RemoveAccountConfirmation + { + get + { + return ResourceManager.GetString("RemoveAccountConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing account. + /// + public static string RemoveAccountMessage + { + get + { + return ResourceManager.GetString("RemoveAccountMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove Add-On Confirmation. + /// + public static string RemoveAddOnConformation + { + get + { + return ResourceManager.GetString("RemoveAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm.. + /// + public static string RemoveAddOnMessage + { + get + { + return ResourceManager.GetString("RemoveAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureBGPPeering Operation failed.. + /// + public static string RemoveAzureBGPPeeringFailed + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Bgp Peering. + /// + public static string RemoveAzureBGPPeeringMessage + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Bgp Peering with Service Key {0}.. + /// + public static string RemoveAzureBGPPeeringSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Bgp Peering with service key '{0}'?. + /// + public static string RemoveAzureBGPPeeringWarning + { + get + { + return ResourceManager.GetString("RemoveAzureBGPPeeringWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit with service key '{0}'?. + /// + public static string RemoveAzureDedicatdCircuitWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatdCircuitWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuit Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureDedicatedCircuitLink Operation failed.. + /// + public static string RemoveAzureDedicatedCircuitLinkFailed + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circui Link. + /// + public static string RemoveAzureDedicatedCircuitLinkMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1}. + /// + public static string RemoveAzureDedicatedCircuitLinkSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'?. + /// + public static string RemoveAzureDedicatedCircuitLinkWarning + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitLinkWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing Dedicated Circuit. + /// + public static string RemoveAzureDedicatedCircuitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Azure Dedicated Circuit with Service Key {0}.. + /// + public static string RemoveAzureDedicatedCircuitSucceeded + { + get + { + return ResourceManager.GetString("RemoveAzureDedicatedCircuitSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing cloud service {0}.... + /// + public static string RemoveAzureServiceWaitMessage + { + get + { + return ResourceManager.GetString("RemoveAzureServiceWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription.. + /// + public static string RemoveDefaultSubscription + { + get + { + return ResourceManager.GetString("RemoveDefaultSubscription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing {0} deployment for {1} service. + /// + public static string RemoveDeploymentWaitMessage + { + get + { + return ResourceManager.GetString("RemoveDeploymentWaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'?. + /// + public static string RemoveEnvironmentConfirmation + { + get + { + return ResourceManager.GetString("RemoveEnvironmentConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing environment. + /// + public static string RemoveEnvironmentMessage + { + get + { + return ResourceManager.GetString("RemoveEnvironmentMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job collection. + /// + public static string RemoveJobCollectionMessage + { + get + { + return ResourceManager.GetString("RemoveJobCollectionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job collection "{0}". + /// + public static string RemoveJobCollectionWarning + { + get + { + return ResourceManager.GetString("RemoveJobCollectionWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing job. + /// + public static string RemoveJobMessage + { + get + { + return ResourceManager.GetString("RemoveJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the job "{0}". + /// + public static string RemoveJobWarning + { + get + { + return ResourceManager.GetString("RemoveJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the account?. + /// + public static string RemoveMediaAccountWarning + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account removed.. + /// + public static string RemoveMediaAccountWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveMediaAccountWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription.. + /// + public static string RemoveNamespaceErrorMessage + { + get + { + return ResourceManager.GetString("RemoveNamespaceErrorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing old package {0}.... + /// + public static string RemovePackage + { + get + { + return ResourceManager.GetString("RemovePackage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile?. + /// + public static string RemoveProfileConfirmation + { + get + { + return ResourceManager.GetString("RemoveProfileConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing the Azure profile. + /// + public static string RemoveProfileMessage + { + get + { + return ResourceManager.GetString("RemoveProfileMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the namespace '{0}'?. + /// + public static string RemoveServiceBusNamespaceConfirmation + { + get + { + return ResourceManager.GetString("RemoveServiceBusNamespaceConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove cloud service?. + /// + public static string RemoveServiceWarning + { + get + { + return ResourceManager.GetString("RemoveServiceWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove cloud service and all it's deployments. + /// + public static string RemoveServiceWhatIfMessage + { + get + { + return ResourceManager.GetString("RemoveServiceWhatIfMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove subscription '{0}'?. + /// + public static string RemoveSubscriptionConfirmation + { + get + { + return ResourceManager.GetString("RemoveSubscriptionConfirmation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing subscription. + /// + public static string RemoveSubscriptionMessage + { + get + { + return ResourceManager.GetString("RemoveSubscriptionMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The endpoint {0} cannot be removed from profile {1} because it's not in the profile.. + /// + public static string RemoveTrafficManagerEndpointMissing + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerEndpointMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Remove-AzureTrafficManagerProfile Operation failed.. + /// + public static string RemoveTrafficManagerProfileFailed + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileFailed", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Successfully removed Traffic Manager profile with name {0}.. + /// + public static string RemoveTrafficManagerProfileSucceeded + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileSucceeded", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the Traffic Manager profile "{0}"?. + /// + public static string RemoveTrafficManagerProfileWarning + { + get + { + return ResourceManager.GetString("RemoveTrafficManagerProfileWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to delete the VM '{0}'?. + /// + public static string RemoveVMConfirmationMessage + { + get + { + return ResourceManager.GetString("RemoveVMConfirmationMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting VM.. + /// + public static string RemoveVMMessage + { + get + { + return ResourceManager.GetString("RemoveVMMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing WebJob.... + /// + public static string RemoveWebJobMessage + { + get + { + return ResourceManager.GetString("RemoveWebJobMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove job '{0}'?. + /// + public static string RemoveWebJobWarning + { + get + { + return ResourceManager.GetString("RemoveWebJobWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing website. + /// + public static string RemoveWebsiteMessage + { + get + { + return ResourceManager.GetString("RemoveWebsiteMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to remove the website "{0}". + /// + public static string RemoveWebsiteWarning + { + get + { + return ResourceManager.GetString("RemoveWebsiteWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Removing public environment is not supported.. + /// + public static string RemovingDefaultEnvironmentsNotSupported + { + get + { + return ResourceManager.GetString("RemovingDefaultEnvironmentsNotSupported", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Deleting namespace. + /// + public static string RemovingNamespaceMessage + { + get + { + return ResourceManager.GetString("RemovingNamespaceMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Repository is not setup. You need to pass a valid site name.. + /// + public static string RepositoryNotSetup + { + get + { + return ResourceManager.GetString("RepositoryNotSetup", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use.. + /// + public static string ReservedIPNameNoLongerInUseButStillBeingReserved + { + get + { + return ResourceManager.GetString("ReservedIPNameNoLongerInUseButStillBeingReserved", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resource with ID : {0} does not exist.. + /// + public static string ResourceNotFound + { + get + { + return ResourceManager.GetString("ResourceNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Restart. + /// + public static string Restart + { + get + { + return ResourceManager.GetString("Restart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Resume. + /// + public static string Resume + { + get + { + return ResourceManager.GetString("Resume", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /role:{0};"{1}/{0}" . + /// + public static string RoleArgTemplate + { + get + { + return ResourceManager.GetString("RoleArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to bin. + /// + public static string RoleBinFolderName + { + get + { + return ResourceManager.GetString("RoleBinFolderName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} is {1}. + /// + public static string RoleInstanceWaitMsg + { + get + { + return ResourceManager.GetString("RoleInstanceWaitMsg", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 20. + /// + public static string RoleMaxInstances + { + get + { + return ResourceManager.GetString("RoleMaxInstances", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to role name. + /// + public static string RoleName + { + get + { + return ResourceManager.GetString("RoleName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided role name {0} doesn't exist. + /// + public static string RoleNotFoundMessage + { + get + { + return ResourceManager.GetString("RoleNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RoleSettings.xml. + /// + public static string RoleSettingsTemplateFileName + { + get + { + return ResourceManager.GetString("RoleSettingsTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role type {0} doesn't exist. + /// + public static string RoleTypeDoesNotExist + { + get + { + return ResourceManager.GetString("RoleTypeDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to public static Dictionary<string, Location> ReverseLocations { get; private set; }. + /// + public static string RuntimeDeploymentLocationError + { + get + { + return ResourceManager.GetString("RuntimeDeploymentLocationError", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Preparing runtime deployment for service '{0}'. + /// + public static string RuntimeDeploymentStart + { + get + { + return ResourceManager.GetString("RuntimeDeploymentStart", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version?. + /// + public static string RuntimeMismatchWarning + { + get + { + return ResourceManager.GetString("RuntimeMismatchWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEOVERRIDEURL. + /// + public static string RuntimeOverrideKey + { + get + { + return ResourceManager.GetString("RuntimeOverrideKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /runtimemanifest/runtimes/runtime. + /// + public static string RuntimeQuery + { + get + { + return ResourceManager.GetString("RuntimeQuery", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEID. + /// + public static string RuntimeTypeKey + { + get + { + return ResourceManager.GetString("RuntimeTypeKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEURL. + /// + public static string RuntimeUrlKey + { + get + { + return ResourceManager.GetString("RuntimeUrlKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to RUNTIMEVERSIONPRIMARYKEY. + /// + public static string RuntimeVersionPrimaryKey + { + get + { + return ResourceManager.GetString("RuntimeVersionPrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to scaffold.xml. + /// + public static string ScaffoldXml + { + get + { + return ResourceManager.GetString("ScaffoldXml", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation. + /// + public static string SchedulerInvalidLocation + { + get + { + return ResourceManager.GetString("SchedulerInvalidLocation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the Secondary Peer Subnet has to be provided.. + /// + public static string SecondaryPeerSubnetRequired + { + get + { + return ResourceManager.GetString("SecondaryPeerSubnetRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} already exists on disk in location {1}. + /// + public static string ServiceAlreadyExistsOnDisk + { + get + { + return ResourceManager.GetString("ServiceAlreadyExistsOnDisk", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to No ServiceBus authorization rule with the given characteristics was found. + /// + public static string ServiceBusAuthorizationRuleNotFound + { + get + { + return ResourceManager.GetString("ServiceBusAuthorizationRuleNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The service bus entity '{0}' is not found.. + /// + public static string ServiceBusEntityTypeNotFound + { + get + { + return ResourceManager.GetString("ServiceBusEntityTypeNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Internal Server Error. This could happen due to an incorrect/missing namespace. + /// + public static string ServiceBusNamespaceMissingMessage + { + get + { + return ResourceManager.GetString("ServiceBusNamespaceMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service configuration. + /// + public static string ServiceConfiguration + { + get + { + return ResourceManager.GetString("ServiceConfiguration", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service definition. + /// + public static string ServiceDefinition + { + get + { + return ResourceManager.GetString("ServiceDefinition", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to ServiceDefinition.csdef. + /// + public static string ServiceDefinitionFileName + { + get + { + return ResourceManager.GetString("ServiceDefinitionFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0}Deploy. + /// + public static string ServiceDeploymentName + { + get + { + return ResourceManager.GetString("ServiceDeploymentName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The specified cloud service "{0}" does not exist.. + /// + public static string ServiceDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is in {2} state, please wait until it finish and update it's status. + /// + public static string ServiceIsInTransitionState + { + get + { + return ResourceManager.GetString("ServiceIsInTransitionState", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}.". + /// + public static string ServiceManagementClientExceptionStringFormat + { + get + { + return ResourceManager.GetString("ServiceManagementClientExceptionStringFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Begin Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSBeginOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSBeginOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Completed Operation: {0}. + /// + public static string ServiceManagementExecuteClientActionInOCSCompletedOperation + { + get + { + return ResourceManager.GetString("ServiceManagementExecuteClientActionInOCSCompletedOperation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service name. + /// + public static string ServiceName + { + get + { + return ResourceManager.GetString("ServiceName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provided service name {0} already exists, please pick another name. + /// + public static string ServiceNameExists + { + get + { + return ResourceManager.GetString("ServiceNameExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please provide name for the hosted service. + /// + public static string ServiceNameMissingMessage + { + get + { + return ResourceManager.GetString("ServiceNameMissingMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service parent directory. + /// + public static string ServiceParentDirectory + { + get + { + return ResourceManager.GetString("ServiceParentDirectory", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Service {0} removed successfully. + /// + public static string ServiceRemovedMessage + { + get + { + return ResourceManager.GetString("ServiceRemovedMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service directory. + /// + public static string ServiceRoot + { + get + { + return ResourceManager.GetString("ServiceRoot", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to service settings. + /// + public static string ServiceSettings + { + get + { + return ResourceManager.GetString("ServiceSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.. + /// + public static string ServiceSettings_ValidateStorageAccountName_InvalidName + { + get + { + return ResourceManager.GetString("ServiceSettings_ValidateStorageAccountName_InvalidName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The {0} slot for cloud service {1} doesn't exist.. + /// + public static string ServiceSlotDoesNotExist + { + get + { + return ResourceManager.GetString("ServiceSlotDoesNotExist", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {0} slot for service {1} is {2}. + /// + public static string ServiceStatusChanged + { + get + { + return ResourceManager.GetString("ServiceStatusChanged", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Set Add-On Confirmation. + /// + public static string SetAddOnConformation + { + get + { + return ResourceManager.GetString("SetAddOnConformation", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Profile {0} does not contain endpoint {1}. Adding it.. + /// + public static string SetInexistentTrafficManagerEndpointMessage + { + get + { + return ResourceManager.GetString("SetInexistentTrafficManagerEndpointMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my + ///contact information with {2}.. + /// + public static string SetMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Note - You will be charged the amount for the new plan, without being refunded for time remaining + ///in the existing plan. + ///By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis + ///for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) + ///acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of + ///use and privacy statement at <url> and (c) agree to sharing my contact information with {2}.. + /// + public static string SetNonMicrosoftAddOnMessage + { + get + { + return ResourceManager.GetString("SetNonMicrosoftAddOnMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Role {0} instances are set to {1}. + /// + public static string SetRoleInstancesMessage + { + get + { + return ResourceManager.GetString("SetRoleInstancesMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to {"Slot":"","Location":"","Subscription":"","StorageAccountName":""}. + /// + public static string SettingsFileEmptyContent + { + get + { + return ResourceManager.GetString("SettingsFileEmptyContent", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to deploymentSettings.json. + /// + public static string SettingsFileName + { + get + { + return ResourceManager.GetString("SettingsFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Insufficient parameters passed to create a new endpoint.. + /// + public static string SetTrafficManagerEndpointNeedsParameters + { + get + { + return ResourceManager.GetString("SetTrafficManagerEndpointNeedsParameters", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ambiguous operation: the profile name specified doesn't match the name of the profile object.. + /// + public static string SetTrafficManagerProfileAmbiguous + { + get + { + return ResourceManager.GetString("SetTrafficManagerProfileAmbiguous", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts.. + /// + public static string ShouldContinueFail + { + get + { + return ResourceManager.GetString("ShouldContinueFail", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Confirm. + /// + public static string ShouldProcessCaption + { + get + { + return ResourceManager.GetString("ShouldProcessCaption", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailConfirm + { + get + { + return ResourceManager.GetString("ShouldProcessFailConfirm", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again.. + /// + public static string ShouldProcessFailImpact + { + get + { + return ResourceManager.GetString("ShouldProcessFailImpact", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter.. + /// + public static string ShouldProcessFailWhatIf + { + get + { + return ResourceManager.GetString("ShouldProcessFailWhatIf", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Shutdown. + /// + public static string Shutdown + { + get + { + return ResourceManager.GetString("Shutdown", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to /sites:{0};{1};"{2}/{0}" . + /// + public static string SitesArgTemplate + { + get + { + return ResourceManager.GetString("SitesArgTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to 1000. + /// + public static string StandardRetryDelayInMs + { + get + { + return ResourceManager.GetString("StandardRetryDelayInMs", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Start. + /// + public static string Start + { + get + { + return ResourceManager.GetString("Start", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Started. + /// + public static string StartedEmulator + { + get + { + return ResourceManager.GetString("StartedEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Starting Emulator.... + /// + public static string StartingEmulator + { + get + { + return ResourceManager.GetString("StartingEmulator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to start. + /// + public static string StartStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StartStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop. + /// + public static string Stop + { + get + { + return ResourceManager.GetString("Stop", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopping emulator.... + /// + public static string StopEmulatorMessage + { + get + { + return ResourceManager.GetString("StopEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stopped. + /// + public static string StoppedEmulatorMessage + { + get + { + return ResourceManager.GetString("StoppedEmulatorMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to stop. + /// + public static string StopStorageEmulatorCommandArgument + { + get + { + return ResourceManager.GetString("StopStorageEmulatorCommandArgument", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Account Name:. + /// + public static string StorageAccountName + { + get + { + return ResourceManager.GetString("StorageAccountName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot find storage account '{0}' please type the name of an existing storage account.. + /// + public static string StorageAccountNotFound + { + get + { + return ResourceManager.GetString("StorageAccountNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to AzureStorageEmulator.exe. + /// + public static string StorageEmulatorExe + { + get + { + return ResourceManager.GetString("StorageEmulatorExe", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to InstallPath. + /// + public static string StorageEmulatorInstallPathRegistryKeyValue + { + get + { + return ResourceManager.GetString("StorageEmulatorInstallPathRegistryKeyValue", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to SOFTWARE\Microsoft\Windows Azure Storage Emulator. + /// + public static string StorageEmulatorRegistryKey + { + get + { + return ResourceManager.GetString("StorageEmulatorRegistryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Primary Key:. + /// + public static string StoragePrimaryKey + { + get + { + return ResourceManager.GetString("StoragePrimaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Secondary Key:. + /// + public static string StorageSecondaryKey + { + get + { + return ResourceManager.GetString("StorageSecondaryKey", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription named {0} already exists.. + /// + public static string SubscriptionAlreadyExists + { + get + { + return ResourceManager.GetString("SubscriptionAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information.. + /// + public static string SubscriptionDataFileDeprecated + { + get + { + return ResourceManager.GetString("SubscriptionDataFileDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to DefaultSubscriptionData.xml. + /// + public static string SubscriptionDataFileName + { + get + { + return ResourceManager.GetString("SubscriptionDataFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription data file {0} does not exist.. + /// + public static string SubscriptionDataFileNotFound + { + get + { + return ResourceManager.GetString("SubscriptionDataFileNotFound", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription id {0} doesn't exist.. + /// + public static string SubscriptionIdNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionIdNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription must not be null. + /// + public static string SubscriptionMustNotBeNull + { + get + { + return ResourceManager.GetString("SubscriptionMustNotBeNull", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription name needs to be specified.. + /// + public static string SubscriptionNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The subscription name {0} doesn't exist.. + /// + public static string SubscriptionNameNotFoundMessage + { + get + { + return ResourceManager.GetString("SubscriptionNameNotFoundMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Subscription needs to be specified.. + /// + public static string SubscriptionNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("SubscriptionNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Suspend. + /// + public static string Suspend + { + get + { + return ResourceManager.GetString("Suspend", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Swapping website production slot .... + /// + public static string SwappingWebsite + { + get + { + return ResourceManager.GetString("SwappingWebsite", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Are you sure you want to swap the website '{0}' production slot with slot '{1}'?. + /// + public static string SwapWebsiteSlotWarning + { + get + { + return ResourceManager.GetString("SwapWebsiteSlotWarning", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Switch-AzureMode cmdlet is deprecated and will be removed in a future release.. + /// + public static string SwitchAzureModeDeprecated + { + get + { + return ResourceManager.GetString("SwitchAzureModeDeprecated", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}'. + /// + public static string TraceBeginLROJob + { + get + { + return ResourceManager.GetString("TraceBeginLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}'. + /// + public static string TraceBlockLROThread + { + get + { + return ResourceManager.GetString("TraceBlockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Completing cmdlet execution in RunJob. + /// + public static string TraceEndLROJob + { + get + { + return ResourceManager.GetString("TraceEndLROJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}'. + /// + public static string TraceHandleLROStateChange + { + get + { + return ResourceManager.GetString("TraceHandleLROStateChange", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job due to stoppage or failure. + /// + public static string TraceHandlerCancelJob + { + get + { + return ResourceManager.GetString("TraceHandlerCancelJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Unblocking job that was previously blocked.. + /// + public static string TraceHandlerUnblockJob + { + get + { + return ResourceManager.GetString("TraceHandlerUnblockJob", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Error in cmdlet execution. + /// + public static string TraceLROJobException + { + get + { + return ResourceManager.GetString("TraceLROJobException", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: Removing state changed event handler, exception '{0}'. + /// + public static string TraceRemoveLROEventHandler + { + get + { + return ResourceManager.GetString("TraceRemoveLROEventHandler", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [AzureLongRunningJob]: ShouldMethod '{0}' unblocked.. + /// + public static string TraceUnblockLROThread + { + get + { + return ResourceManager.GetString("TraceUnblockLROThread", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}.. + /// + public static string UnableToDecodeBase64String + { + get + { + return ResourceManager.GetString("UnableToDecodeBase64String", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Unable to update mismatching Json structured: {0} {1}.. + /// + public static string UnableToPatchJson + { + get + { + return ResourceManager.GetString("UnableToPatchJson", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The provider {0} is unknown.. + /// + public static string UnknownProviderMessage + { + get + { + return ResourceManager.GetString("UnknownProviderMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Update. + /// + public static string Update + { + get + { + return ResourceManager.GetString("Update", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Updated settings for subscription '{0}'. Current subscription is '{1}'.. + /// + public static string UpdatedSettings + { + get + { + return ResourceManager.GetString("UpdatedSettings", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name is not valid.. + /// + public static string UserNameIsNotValid + { + get + { + return ResourceManager.GetString("UserNameIsNotValid", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to User name needs to be specified.. + /// + public static string UserNameNeedsToBeSpecified + { + get + { + return ResourceManager.GetString("UserNameNeedsToBeSpecified", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A value for the VLan Id has to be provided.. + /// + public static string VlanIdRequired + { + get + { + return ResourceManager.GetString("VlanIdRequired", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Please wait.... + /// + public static string WaitMessage + { + get + { + return ResourceManager.GetString("WaitMessage", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The azure storage emulator is not installed, skip launching.... + /// + public static string WarningWhenStorageEmulatorIsMissing + { + get + { + return ResourceManager.GetString("WarningWhenStorageEmulatorIsMissing", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Web.cloud.config. + /// + public static string WebCloudConfig + { + get + { + return ResourceManager.GetString("WebCloudConfig", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to web.config. + /// + public static string WebConfigTemplateFileName + { + get + { + return ResourceManager.GetString("WebConfigTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to MSDeploy. + /// + public static string WebDeployKeywordInWebSitePublishProfile + { + get + { + return ResourceManager.GetString("WebDeployKeywordInWebSitePublishProfile", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Cannot build the project successfully. Please see logs in {0}.. + /// + public static string WebProjectBuildFailTemplate + { + get + { + return ResourceManager.GetString("WebProjectBuildFailTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole. + /// + public static string WebRole + { + get + { + return ResourceManager.GetString("WebRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_web.cmd > log.txt. + /// + public static string WebRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WebRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebRole.xml. + /// + public static string WebRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WebRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Webspace.. + /// + public static string WebsiteAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WebSite with given name {0} already exists in the specified Subscription and Location.. + /// + public static string WebsiteAlreadyExistsReplacement + { + get + { + return ResourceManager.GetString("WebsiteAlreadyExistsReplacement", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Site {0} already has repository created for it.. + /// + public static string WebsiteRepositoryAlreadyExists + { + get + { + return ResourceManager.GetString("WebsiteRepositoryAlreadyExists", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Workspaces/WebsiteExtension/Website/{0}/dashboard/. + /// + public static string WebsiteSufixUrl + { + get + { + return ResourceManager.GetString("WebsiteSufixUrl", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to https://{0}/msdeploy.axd?site={1}. + /// + public static string WebSiteWebDeployUriTemplate + { + get + { + return ResourceManager.GetString("WebSiteWebDeployUriTemplate", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole. + /// + public static string WorkerRole + { + get + { + return ResourceManager.GetString("WorkerRole", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to setup_worker.cmd > log.txt. + /// + public static string WorkerRoleStartupTaskCommandLine + { + get + { + return ResourceManager.GetString("WorkerRoleStartupTaskCommandLine", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WorkerRole.xml. + /// + public static string WorkerRoleTemplateFileName + { + get + { + return ResourceManager.GetString("WorkerRoleTemplateFileName", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to (x86). + /// + public static string x86InProgramFiles + { + get + { + return ResourceManager.GetString("x86InProgramFiles", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes. + /// + public static string Yes + { + get + { + return ResourceManager.GetString("Yes", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Yes, I agree. + /// + public static string YesHint + { + get + { + return ResourceManager.GetString("YesHint", resourceCulture); + } + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Properties/Resources.resx b/swaggerci/oracle.DefaultTag/generated/runtime/Properties/Resources.resx new file mode 100644 index 000000000000..a08a2e50172b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Properties/Resources.resx @@ -0,0 +1,1747 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The remote server returned an error: (401) Unauthorized. + + + Account "{0}" has been added. + + + To switch to a different subscription, please use Select-AzureSubscription. + + + Subscription "{0}" is selected as the default subscription. + + + To view all the subscriptions, please use Get-AzureSubscription. + + + Add-On {0} is created successfully. + + + Add-on name {0} is already used. + + + Add-On {0} not found. + + + Add-on {0} is removed successfully. + + + Add-On {0} is updated successfully. + + + Role has been created at {0}\{1}. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for Node.js by running ‘npm install azure’. + + + Role has been created at {0}\{1}. For easy access to Microsoft Azure services from your application code, install the Microsoft Azure client library for PHP by running "pear WindowsAzure/WindowsAzure". + + + Unable to set role permissions. Please give the 'Network Service' user 'Read & execute' and 'Modify' permissions to the role folder, or run PowerShell as an Administrator + + + A role name '{0}' already exists + + + Windows Azure Powershell\ + + + https://manage.windowsazure.com + + + AZURE_PORTAL_URL + + + Azure SDK\{0}\ + + + Base Uri was empty. + WAPackIaaS + + + {0} begin processing without ParameterSet. + + + {0} begin processing with ParameterSet '{1}'. + + + Blob with the name {0} already exists in the account. + + + https://{0}.blob.core.windows.net/ + + + AZURE_BLOBSTORAGE_TEMPLATE + + + CACHERUNTIMEURL + + + cache + + + CacheRuntimeVersion + + + Installing caching version {0} for Role '{1}' (the caching version locally installed is: {2}) + + + Cannot find {0} with name {1}. + + + Deployment for service {0} with {1} slot doesn't exist + + + Can't find valid Microsoft Azure role in current directory {0} + + + service {0} configuration file (ServiceConfiguration.Cloud.cscfg) is either null or doesn't exist + + + Invalid service path! Cannot locate ServiceDefinition.csdef in current folder or parent folders. + + + The subscription named {0} with id {1} is not currently imported. You must import this subscription before it can be updated. + + + ManagementCertificate + + + certificate.pfx + + + Certificate imported into CurrentUser\My\{0} + + + Your account does not have access to the private key for certificate {0} + + + {0} {1} deployment for {2} service + + + Cloud service {0} is in {1} state. + + + Changing/Removing public environment '{0}' is not allowed. + + + Service {0} is set to value {1} + + + Choose which publish settings file to use: + + + Microsoft.WindowsAzure.Plugins.Caching.ClientDiagnosticLevel + + + 1 + + + cloud_package.cspkg + + + ServiceConfiguration.Cloud.cscfg + + + Add-ons for {0} + + + Communication could not be established. This could be due to an invalid subscription ID. Note that subscription IDs are case sensitive. + + + Complete + + + config.json + + + VirtualMachine creation failed. + WAPackIaaS + + + Creating the website failed. If this is the first website for this subscription, please create it using the management portal instead. + + + Microsoft.ApplicationServer.Caching.DataCacheClientsSection, Microsoft.ApplicationServer.Caching.Core + + + //blobcontainer[@datacenter='{0}'] + + + Setting: {0} as the default and current subscription. To view other subscriptions use Get-AzureSubscription + + + none + + + There are no hostnames which could be used for validation. + + + 8080 + + + 1000 + + + Auto + + + 80 + + + Delete + WAPackIaaS + + + The {0} slot for service {1} is already in {2} state + + + The deployment in {0} slot for service {1} is removed + + + Microsoft.WindowsAzure.Plugins.Caching.DiagnosticLevel + + + 1 + + + The key to add already exists in the dictionary. + + + The array index cannot be less than zero. + + + The supplied array does not have enough room to contain the copied elements. + + + The provided dns {0} doesn't exist + + + Microsoft Azure Certificate + + + Endpoint can't be retrieved for storage account + + + {0} end processing. + + + To use Active Directory authentication, you must configure the ActiveDirectoryEndpoint, ActiveDirectoryTenantId, and ActiveDirectorServiceEndpointResourceId for environment of '{0}'. You can configure these properties for this environment using the Set-AzureEnvironment cmdlet. + + + The environment '{0}' already exists. + + + environments.xml + + + Error creating VirtualMachine + WAPackIaaS + + + Unable to download available runtimes for location '{0}' + + + Error updating VirtualMachine + WAPackIaaS + + + Job Id {0} failed. Error: {1}, ExceptionDetails: {2} + WAPackIaaS + + + The HTTP request was forbidden with client authentication scheme 'Anonymous'. + + + This add-on requires you to purchase the first instance through the Microsoft Azure Portal. Subsequent purchases can be performed through PowerShell. + + + Operation Status: + + + Resources\Scaffolding\General + + + Getting all available Microsoft Azure Add-Ons, this may take few minutes... + + + Name{0}Primary Key{0}Seconday Key + + + Git not found. Please install git and place it in your command line path. + + + Could not find publish settings. Please run Import-AzurePublishSettingsFile. + + + iisnode.dll + + + iisnode + + + iisnode-dev\\release\\x64 + + + iisnode + + + Installing IISNode version {0} in Azure for WebRole '{1}' (the version locally installed is: {2}) + + + Internal Server Error + + + Cannot enable memcach protocol on a cache worker role {0}. + + + Invalid certificate format. + + + The provided configuration path is invalid or doesn't exist + + + The country name is invalid, please use a valid two character country code, as described in ISO 3166-1 alpha-2. + + + Deployment with {0} does not exist + + + The deployment slot name {0} is invalid. Slot name must be either "Staging" or "Production". + + + Invalid service endpoint. + + + File {0} has invalid characters + + + You must create your git publishing credentials using the Microsoft Azure portal. +Please follow these steps in the portal: +1. On the left side open "Web Sites" +2. Click on any website +3. Choose "Setup Git Publishing" or "Reset deployment credentials" +4. Back in the PowerShell window, rerun this command by typing "New-AzureWebSite {site name} -Git -PublishingUsername {username} + + + The value {0} provided is not a valid GUID. Please provide a valid GUID. + + + The specified hostname does not exist. Please specify a valid hostname for the site. + + + Role {0} instances must be greater than or equal 0 and less than or equal 20 + + + There was an error creating your webjob. Please make sure that the script is in the root folder of the zip file. + + + Could not download a valid runtime manifest, Please check your internet connection and try again. + + + The account {0} was not found. Please specify a valid account name. + + + The provided name "{0}" does not match the service bus namespace naming rules. + + + Value cannot be null. Parameter name: '{0}' + + + The provided package path is invalid or doesn't exist + + + '{0}' is an invalid parameter set name. + + + {0} doesn't exist in {1} or you've not passed valid value for it + + + Path {0} has invalid characters + + + The provided publish settings file {0} has invalid content. Please get valid by running cmdlet Get-AzurePublishSettingsFile + + + The provided role name "{0}" has invalid characters + + + A valid name for the service root folder is required + + + {0} is not a recognized runtime type + + + A valid language is required + + + No subscription is currently selected. Use Select-Subscription to activate a subscription. + + + The provided location "{0}" does not exist in the available locations use Get-AzureSBLocation for listing available locations. + + + Please provide a service name or run this command from inside a service project directory. + + + You must provide valid value for {0} + + + settings.json is invalid or doesn't exist + + + The subscription named '{0}' cannot be found. Use Set-AzureSubscription to initialize the subscription data. + + + The provided subscription id {0} is not valid + + + A valid subscription name is required. This can be provided using the -Subscription parameter or by setting the subscription via the Set-AzureSubscription cmdlet + + + The provided subscriptions file {0} has invalid content. + + + Role {0} VM size should be ExtraSmall, Small, Medium, Large or ExtraLarge. + + + The web job file must have *.zip extension + + + Singleton option works for continuous jobs only. + + + The website {0} was not found. Please specify a valid website name. + + + No job for id: {0} was found. + WAPackIaaS + + + engines + + + Scaffolding for this language is not yet supported + + + Link already established + + + local_package.csx + + + ServiceConfiguration.Local.cscfg + + + Looking for {0} deployment for {1} cloud service... + + + Looking for cloud service {0}... + + + managementCertificate.pem + + + ?whr={0} + + + //baseuri + + + uri + + + http://az413943.vo.msecnd.net/node/runtimemanifest_0.7.5.2.xml + + + Multiple Add-Ons found holding name {0} + + + Multiple possible publishing users. Please go to the Portal and use the listed deployment user, or click 'set/reset deployment credentials' to set up a new user account, then reurn this cmdlet and specify PublishingUsername. + + + The first publish settings file "{0}" is used. If you want to use another file specify the file name. + + + Microsoft.WindowsAzure.Plugins.Caching.NamedCaches + + + {"caches":[{"name":"default","policy":{"eviction":{"type":0},"expiration":{"defaultTTL":10,"isExpirable":true,"type":1},"serverNotification":{"isEnabled":false}},"secondaries":0}]} + + + A publishing username is required. Please specify one using the argument PublishingUsername. + + + New Add-On Confirmation + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Internal Server Error. This could happen because the namespace name is already used or due to an incorrect location name. Use Get-AzureSBLocation cmdlet to list valid names. + + + By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at {0} and (c) agree to sharing my contact information with {2}. + + + Service has been created at {0} + + + No + + + There is no access token cached for subscription {0}, user id {1}. Use the Add-AzureAccount cmdlet to log in again and get a token for this subscription. + + + The service does not have any cache worker roles, add one first by running cmdlet Add-AzureCacheWorkerRole. + + + No clouds available + WAPackIaaS + + + nodejs + + + node + + + node.exe + + + There is no default subscription set, please set a default subscription by running Set-AzureSubscription -Default <subscription name> + + + Microsoft SDKs\Azure\Nodejs\Nov2011 + + + nodejs + + + node + + + Resources\Scaffolding\Node + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.Node + + + Installing Node version {0} in Azure for Role '{1}' (the Node version locally installed is: {2}) + + + No, I do not agree + + + No publish settings files with extension *.publishsettings are found in the directory "{0}". + + + '{0}' must be a cache worker role. Verify that it has proper cache worker role configuration. + + + Certificate can't be null. + + + {0} could not be null or empty + + + Unable to add a null RoleSettings to {0} + + + Unable to add new role to null service definition + + + The request offer '{0}' is not found. + + + Operation "{0}" failed on VM with ID: {1} + WAPackIaaS + + + The REST operation failed with message '{0}' and error code '{1}' + + + Job Id {0} did not complete within expected time or it is in Failed/Canceled/Invalid state. + WAPackIaaS + + + package + + + Package is created at service root path {0}. + + + {{ + "author": "", + + "name": "{0}", + "version": "0.0.0", + "dependencies":{{}}, + "devDependencies":{{}}, + "optionalDependencies": {{}}, + "engines": {{ + "node": "*", + "iisnode": "*" + }} + +}} + + + + package.json + + + A value for the Peer Asn has to be provided. + + + 5.4.0 + + + php + + + Resources\Scaffolding\PHP + + + Microsoft.WindowsAzure.Commands.CloudService.ScaffoldingResources.PHP + + + Installing PHP version {0} for Role '{1}' (the PHP version locally installed is: {2}) + + + You must create your first web site using the Microsoft Azure portal. +Please follow these steps in the portal: +1. At the bottom of the page, click on New > Web Site > Quick Create +2. Type {0} in the URL field +3. Click on "Create Web Site" +4. Once the site has been created, click on the site name +5. Click on "Set up Git publishing" or "Reset deployment credentials" and setup a publishing username and password. Use those credentials for all new websites you create. + + + 6. Back in the console window, rerun this command by typing "New-AzureWebsite <site name> -Git" + + + A value for the Primary Peer Subnet has to be provided. + + + Promotion code can be used only when updating to a new plan. + + + Service not published at user request. + + + Complete. + + + Connecting... + + + Created Deployment ID: {0}. + + + Created hosted service '{0}'. + + + Created Website URL: {0}. + + + Creating... + + + Initializing... + + + busy + + + creating the virtual machine + + + Instance {0} of role {1} is {2}. + + + ready + + + Preparing deployment for {0} with Subscription ID: {1}... + + + Publishing {0} to Microsoft Azure. This may take several minutes... + + + publish settings + + + Azure + + + .PublishSettings + + + publishSettings.xml + + + Publish settings imported + + + AZURE_PUBLISHINGPROFILE_URL + + + Starting... + + + Upgrading... + + + Uploading Package to storage service {0}... + + + Verifying storage account '{0}'... + + + Replace current deployment with '{0}' Id ? + + + Are you sure you want to regenerate key? + + + Generate new key. + + + Are you sure you want to remove account '{0}'? + + + Removing account + + + Remove Add-On Confirmation + + + If you delete this add-on, your data may be deleted and the operation may not be undone. You may have to purchase it again from the Microsoft Azure Store to use it. The price of the add-on may not be refunded. Are you sure you want to delete this add-on? Enter “Yes” to confirm. + + + Remove-AzureBGPPeering Operation failed. + + + Removing Bgp Peering + + + Successfully removed Azure Bgp Peering with Service Key {0}. + + + Are you sure you want to remove the Bgp Peering with service key '{0}'? + + + Are you sure you want to remove the Dedicated Circuit with service key '{0}'? + + + Remove-AzureDedicatedCircuit Operation failed. + + + Remove-AzureDedicatedCircuitLink Operation failed. + + + Removing Dedicated Circui Link + + + Successfully removed Azure Dedicated Circuit Link with Service Key {0} and Vnet Name {1} + + + Are you sure you want to remove the Dedicated Circuit Link with service key '{0}' and virtual network name '{1}'? + + + Removing Dedicated Circuit + + + Successfully removed Azure Dedicated Circuit with Service Key {0}. + + + Removing cloud service {0}... + + + Removing {0} deployment for {1} service + + + Removing job collection + + + Are you sure you want to remove the job collection "{0}" + + + Removing job + + + Are you sure you want to remove the job "{0}" + + + Are you sure you want to remove the account? + + + Account removed. + + + Internal Server Error. This could happen because the namespace does not exist or it does not exist under your subscription. + + + Removing old package {0}... + + + Are you sure you want to delete the namespace '{0}'? + + + Are you sure you want to remove cloud service? + + + Remove cloud service and all it's deployments + + + Are you sure you want to remove subscription '{0}'? + + + Removing subscription + + + Are you sure you want to delete the VM '{0}'? + + + Deleting VM. + + + Removing WebJob... + + + Are you sure you want to remove job '{0}'? + + + Removing website + + + Are you sure you want to remove the website "{0}" + + + Deleting namespace + + + Repository is not setup. You need to pass a valid site name. + + + Reserved IP with the Name:'{0}' will no longer be in use after the deployment is deleted, and it is still reserved for later use. + + + Resource with ID : {0} does not exist. + WAPackIaaS + + + Restart + WAPackIaaS + + + Resume + WAPackIaaS + + + /role:{0};"{1}/{0}" + + + bin + + + Role {0} is {1} + + + 20 + + + role name + + + The provided role name {0} doesn't exist + + + RoleSettings.xml + + + Role type {0} doesn't exist + + + public static Dictionary<string, Location> ReverseLocations { get; private set; } + + + Preparing runtime deployment for service '{0}' + + + WARNING Runtime Mismatch: Are you sure that you want to publish service '{0}' using an Azure runtime version that does not match your local runtime version? + + + RUNTIMEOVERRIDEURL + + + /runtimemanifest/runtimes/runtime + + + RUNTIMEID + + + RUNTIMEURL + + + RUNTIMEVERSIONPRIMARYKEY + + + scaffold.xml + + + Invalid location entered. Pick one of the locations from Get-AzureSchedulerLocation + + + A value for the Secondary Peer Subnet has to be provided. + + + Service {0} already exists on disk in location {1} + + + No ServiceBus authorization rule with the given characteristics was found + + + The service bus entity '{0}' is not found. + + + Internal Server Error. This could happen due to an incorrect/missing namespace + + + service configuration + + + service definition + + + ServiceDefinition.csdef + + + {0}Deploy + + + The specified cloud service "{0}" does not exist. + + + {0} slot for service {1} is in {2} state, please wait until it finish and update it's status + + + Begin Operation: {0} + + + Completed Operation: {0} + + + Begin Operation: {0} + + + Completed Operation: {0} + + + service name + + + Please provide name for the hosted service + + + service parent directory + + + Service {0} removed successfully + + + service directory + + + service settings + + + The storage account name '{0}' is invalid. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. + + + The {0} slot for cloud service {1} doesn't exist. + + + {0} slot for service {1} is {2} + + + Set Add-On Confirmation + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +agree to the {2}'s terms of user and privacy statement at {0} and (c) agree to sharing my +contact information with {2}. + + + Note - You will be charged the amount for the new plan, without being refunded for time remaining +in the existing plan. +By typing "Yes", I (a) authorize Microsoft to charge my current payment method on a monthly basis +for the amount indicated at {0} for {1} until my service is cancelled or terminated, and (b) +acknowledge the offering is provided by {2}, not Microsoft, and agree to {2}'s terms of +use and privacy statement at <url> and (c) agree to sharing my contact information with {2}. + + + Role {0} instances are set to {1} + + + {"Slot":"","Location":"","Subscription":"","StorageAccountName":""} + + + deploymentSettings.json + + + Confirm + + + Shutdown + WAPackIaaS + + + /sites:{0};{1};"{2}/{0}" + + + 1000 + + + Start + WAPackIaaS + + + Started + + + Starting Emulator... + + + start + + + Stop + WAPackIaaS + + + Stopping emulator... + + + Stopped + + + stop + + + Account Name: + + + Cannot find storage account '{0}' please type the name of an existing storage account. + + + AzureStorageEmulator.exe + + + InstallPath + + + SOFTWARE\Microsoft\Windows Azure Storage Emulator + + + Primary Key: + + + Secondary Key: + + + The subscription named {0} already exists. + + + DefaultSubscriptionData.xml + + + The subscription data file {0} does not exist. + + + Subscription must not be null + WAPackIaaS + + + Suspend + WAPackIaaS + + + Swapping website production slot ... + + + Are you sure you want to swap the website '{0}' production slot with slot '{1}'? + + + The provider {0} is unknown. + + + Update + WAPackIaaS + + + Updated settings for subscription '{0}'. Current subscription is '{1}'. + + + A value for the VLan Id has to be provided. + + + Please wait... + + + The azure storage emulator is not installed, skip launching... + + + Web.cloud.config + + + web.config + + + MSDeploy + + + Cannot build the project successfully. Please see logs in {0}. + + + WebRole + + + setup_web.cmd > log.txt + + + WebRole.xml + + + WebSite with given name {0} already exists in the specified Subscription and Webspace. + + + WebSite with given name {0} already exists in the specified Subscription and Location. + + + Site {0} already has repository created for it. + + + Workspaces/WebsiteExtension/Website/{0}/dashboard/ + + + https://{0}/msdeploy.axd?site={1} + + + WorkerRole + + + setup_worker.cmd > log.txt + + + WorkerRole.xml + + + Yes + + + Yes, I agree + + + Remove-AzureTrafficManagerProfile Operation failed. + + + Successfully removed Traffic Manager profile with name {0}. + + + Are you sure you want to remove the Traffic Manager profile "{0}"? + + + Profile {0} already has an endpoint with name {1} + + + Profile {0} does not contain endpoint {1}. Adding it. + + + The endpoint {0} cannot be removed from profile {1} because it's not in the profile. + + + Insufficient parameters passed to create a new endpoint. + + + Ambiguous operation: the profile name specified doesn't match the name of the profile object. + + + <NONE> + + + "An exception occurred when calling the ServiceManagement API. HTTP Status Code: {0}. Service Management Error Code: {1}. Message: {2}. Operation Tracking ID: {3}." + {0} is the HTTP status code. {1} is the Service Management Error Code. {2} is the Service Management Error message. {3} is the operation tracking ID. + + + Unable to decode string from base 64. Please make sure the string is correctly encoded: {0}. + {0} is the string that is not in a valid base 64 format. + + + Skipping external tenant {0}, because you are using a guest or a foreign principal object identity. In order to access this tenant, please run Add-AzureAccount without "-Credential". + + + Removing an environment will remove all associated subscriptions and accounts. Are you sure you want to remove an environment '{0}'? + + + Removing environment + + + There is no subscription associated with account {0}. + + + Account id doesn't match one in subscription. + + + Environment name doesn't match one in subscription. + + + Removing the Azure profile will remove all associated environments, subscriptions, and accounts. Are you sure you want to remove the Azure profile? + + + Removing the Azure profile + + + The SubscriptionDataFile parameter is deprecated. This parameter will be removed in a future release. See https://github.com/Azure/azure-powershell/wiki/Proposed-Design-Stateless-Azure-Profile for a description of the upcoming mechanism for providing alternate sources of subscription information. + + + Account needs to be specified + + + No default subscription has been designated. Use Select-AzureSubscription -Default <subscriptionName> to set the default subscription. + + + Path must specify a valid path to an Azure profile. + + + Property bag Hashtable must contain one of the following sets of properties: {SubscriptionId, Certificate}, {SubscriptionId, Username, Password}, {SubscriptionId, ServicePrincipal, Password, Tenant}, {SubscriptionId, AccountId, Token} + + + Property bag Hashtable must contain a 'Certificate' of type 'X509Certificate2'. + + + Property bag Hashtable must contain a 'Password' with an associated 'Username' or 'ServicePrincipal'. + + + Property bag Hashtable must contain a 'SubscriptionId'. + + + Selected profile must not be null. + + + The Switch-AzureMode cmdlet is deprecated and will be removed in a future release. + + + OperationID : '{0}' + + + Cannot get module for DscResource '{0}'. Possible solutions: +1) Specify -ModuleName for Import-DscResource in your configuration. +2) Unblock module that contains resource. +3) Move Import-DscResource inside Node block. + + 0 = name of DscResource + + + Your current PowerShell version {1} is less then required by this cmdlet {0}. Consider download and install latest PowerShell version. + {0} = minimal required PS version, {1} = current PS version + + + Parsing configuration script: {0} + {0} is the path to a script file + + + Configuration script '{0}' contained parse errors: +{1} + 0 = path to the configuration script, 1 = parser errors + + + List of required modules: [{0}]. + {0} = list of modules + + + Temp folder '{0}' created. + {0} = temp folder path + + + Copy '{0}' to '{1}'. + {0} = source, {1} = destination + + + Copy the module '{0}' to '{1}'. + {0} = source, {1} = destination + + + File '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the path to a file + + + Configuration file '{0}' not found. + 0 = path to the configuration file + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Path '{0}' not found. + 0 = path to the additional content file/directory + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1) or a ZIP archive (.zip). + 0 = path to the configuration file + + + Invalid configuration file: {0}. +The file needs to be a PowerShell script (.ps1 or .psm1). + 0 = path to the configuration file + + + Create Archive + + + Upload '{0}' + {0} is the name of an storage blob + + + Storage Blob '{0}' already exists. Use the -Force parameter to overwrite it. + {0} is the name of an storage blob + + + Configuration published to {0} + {0} is an URI + + + Deleted '{0}' + {0} is the path of a file + + + Cannot delete '{0}': {1} + {0} is the path of a file, {1} is an error message + + + Cannot find the WadCfg end element in the config. + + + WadCfg start element in the config is not matching the end element. + + + Cannot find the WadCfg element in the config. + + + Cannot find configuration data file: {0} + + + The configuration data must be a .psd1 file + + + Cannot change built-in environment {0}. + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Az.Accounts module. To disable data collection: PS > Disable-AzDataCollection. +Use the Enable-AzDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Az.Accounts module. To enable data collection: PS > Enable-AzDataCollection. + + + Microsoft Azure PowerShell Data Collection Confirmation + + + You choose not to participate in Microsoft Azure PowerShell data collection. + + + This confirmation message will be dismissed in '{0}' second(s)... + + + You choose to participate in Microsoft Azure PowerShell data collection. + + + The setting profile has been saved to the following path '{0}'. + + + [Common.Authentication]: Authenticating for account {0} with single tenant {1}. + + + Changing public environment is not supported. + + + Environment name needs to be specified. + + + Environment needs to be specified. + + + The environment name '{0}' is not found. + + + File path is not valid. + + + Must specify a non-null subscription name. + + + The default subscription is being removed. Use Select-AzureSubscription -Default <subscriptionName> to select a new default subscription. + + + Removing public environment is not supported. + + + The subscription id {0} doesn't exist. + + + Subscription name needs to be specified. + + + The subscription name {0} doesn't exist. + + + Subscription needs to be specified. + + + User name is not valid. + + + User name needs to be specified. + + + "There is no current context, please log in using Connect-AzAccount." + + + No subscriptions are associated with the logged in account in Azure Service Management (RDFE). This means that the logged in user is not an administrator or co-administrator for any account.\r\nDid you mean to execute Connect-AzAccount? + + + No certificate was found in the certificate store with thumbprint {0} + + + Illegal characters in path. + + + Invalid certificate format. Publish settings may be corrupted. Use Get-AzurePublishSettingsFile to download updated settings + + + "{0}" is an invalid DNS name for {1} + + + The provided file in {0} must be have {1} extension + + + {0} is invalid or empty + + + Please connect to internet before executing this cmdlet + + + Path {0} doesn't exist. + + + Path for {0} doesn't exist in {1}. + + + &whr={0} + + + The provided service name {0} already exists, please pick another name + + + Unable to update mismatching Json structured: {0} {1}. + + + (x86) + + + Azure PowerShell collects usage data in order to improve your experience. +The data is anonymous and does not include commandline argument values. +The data is collected by Microsoft. + +Use the Disable-AzureDataCollection cmdlet to turn the feature Off. The cmdlet can be found in the Azure module. To disable data collection: PS > Disable-AzureDataCollection. +Use the Enable-AzureDataCollection cmdlet to turn the feature On. The cmdlet can be found in the Azure module. To enable data collection: PS > Enable-AzureDataCollection. + + + Execution failed because a background thread could not prompt the user. + + + Azure Long-Running Job + + + The cmdlet failed in background execution. The returned error was '{0}'. Please execute the cmdlet again. You may need to execute this cmdlet synchronously, by omitting the '-AsJob' parameter. + 0(string): exception message in background task + + + Please execute the cmdlet again and include the 'Force' parameter, if available, to avoid unnecessary prompts. + + + Please execute the cmdlet again and omit the 'Confirm' parameter when using the 'AsJob' parameter. + + + Please increase the user $ConfirmPreference setting, or include turn off confirmation using '-Confirm:$false' when using the 'AsJob' parameter and execute the cmdet again. + + + Please execute the cmdlet again and omit the 'WhatIf' parameter when using the 'AsJob' parameter. + + + [AzureLongRunningJob]: Starting cmdlet execution, setting for cmdlet confirmation required: '{0}' + 0(bool): whether cmdlet confirmation is required + + + [AzureLongRunningJob]: Blocking job for ShouldMethod '{0}' + 0(string): method type + + + [AzureLongRunningJob]: Completing cmdlet execution in RunJob + + + [AzureLongRunningJob]: State change from '{0}' to '{1}' because '{2}' + 0(string): last state, 1(string): new state, 2(string): state change reason + + + [AzureLongRunningJob]: Unblocking job due to stoppage or failure + + + [AzureLongRunningJob]: Unblocking job that was previously blocked. + + + [AzureLongRunningJob]: Error in cmdlet execution + + + [AzureLongRunningJob]: Removing state changed event handler, exception '{0}' + 0(string): exception message + + + [AzureLongRunningJob]: ShouldMethod '{0}' unblocked. + 0(string): methodType + + + +- The parameter : '{0}' is changing. + + + +- The parameter : '{0}' is becoming mandatory. + + + +- The parameter : '{0}' is being replaced by parameter : '{1}'. + + + +- The parameter : '{0}' is being replaced by mandatory parameter : '{1}'. + + + +- Change description : {0} + + + The cmdlet is being deprecated. There will be no replacement for it. + + + The cmdlet parameter set is being deprecated. There will be no replacement for it. + + + The cmdlet '{0}' is replacing this cmdlet. + + + +- The output type is changing from the existing type :'{0}' to the new type :'{1}' + + + +- The output type '{0}' is changing + + + +- The following properties are being added to the output type : + + + +- The following properties in the output type are being deprecated : + + + {0} + + + +- Cmdlet : '{0}' + - {1} + + + Upcoming breaking changes in the cmdlet '{0}' : + + + +- This change will take effect on '{0}' + + + +- The change is expected to take effect from version : '{0}' + + + ```powershell +# Old +{0} + +# New +{1} +``` + + + + +Cmdlet invocation changes : + Old Way : {0} + New Way : {1} + + + +The output type '{0}' is being deprecated without a replacement. + + + +The type of the parameter is changing from '{0}' to '{1}'. + + + +Note : Go to {0} for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell. + + + This cmdlet is in preview. Its behavior is subject to change based on customer feedback. + + + The estimated generally available date is '{0}'. + + + - The change is expected to take effect from Az version : '{0}' + + \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Response.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Response.cs new file mode 100644 index 000000000000..7d0f229a9cb6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Response.cs @@ -0,0 +1,27 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System; + using System.Threading.Tasks; + public class Response : EventData + { + public Response() : base() + { + } + } + + public class Response : Response + { + private Func> _resultDelegate; + private Task _resultValue; + + public Response(T value) : base() => _resultValue = Task.FromResult(value); + public Response(Func value) : base() => _resultDelegate = () => Task.FromResult(value()); + public Response(Func> value) : base() => _resultDelegate = value; + public Task Result => _resultValue ?? (_resultValue = this._resultDelegate()); + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/JsonSerializer.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/JsonSerializer.cs new file mode 100644 index 000000000000..ca5b2774eb25 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/JsonSerializer.cs @@ -0,0 +1,350 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal class JsonSerializer + { + private int depth = 0; + + private SerializationOptions options = new SerializationOptions(); + + #region Deserialization + + internal T Deseralize(JsonObject json) + where T : new() + { + var contract = JsonModelCache.Get(typeof(T)); + + return (T)DeserializeObject(contract, json); + } + + internal object DeserializeObject(JsonModel contract, JsonObject json) + { + var instance = Activator.CreateInstance(contract.Type); + + depth++; + + // Ensure we don't recurse forever + if (depth > 5) throw new Exception("Depth greater than 5"); + + foreach (var field in json) + { + var member = contract[field.Key]; + + if (member != null) + { + var value = DeserializeValue(member, field.Value); + + member.SetValue(instance, value); + } + } + + depth--; + + return instance; + } + + private object DeserializeValue(JsonMember member, JsonNode value) + { + if (value.Type == JsonType.Null) return null; + + var type = member.Type; + + if (member.IsStringLike && value.Type != JsonType.String) + { + // Take the long path... + return DeserializeObject(JsonModelCache.Get(type), (JsonObject)value); + } + else if (member.Converter != null) + { + return member.Converter.FromJson(value); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (member.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + private object DeserializeValue(Type type, JsonNode value) + { + if (type == null) throw new ArgumentNullException(nameof(type)); + + if (value.Type == JsonType.Null) return null; + + var typeDetails = TypeDetails.Get(type); + + if (typeDetails.JsonConverter != null) + { + return typeDetails.JsonConverter.FromJson(value); + } + else if (typeDetails.IsEnum) + { + return Enum.Parse(type, value.ToString(), ignoreCase: true); + } + else if (type.IsArray) + { + return DeserializeArray(type, (JsonArray)value); + } + else if (typeDetails.IsList) + { + return DeserializeList(type, (JsonArray)value); + } + else + { + var contract = JsonModelCache.Get(type); + + return DeserializeObject(contract, (JsonObject)value); + } + } + + internal Array DeserializeArray(Type type, JsonArray elements) + { + var elementType = type.GetElementType(); + + var elementTypeDetails = TypeDetails.Get(elementType); + + var array = Array.CreateInstance(elementType, elements.Count); + + int i = 0; + + if (elementTypeDetails.JsonConverter != null) + { + foreach (var value in elements) + { + array.SetValue(elementTypeDetails.JsonConverter.FromJson(value), i); + + i++; + } + } + else + { + foreach (var value in elements) + { + array.SetValue(DeserializeValue(elementType, value), i); + + i++; + } + } + + return array; + } + + internal IList DeserializeList(Type type, JsonArray jsonArray) + { + // TODO: Handle non-generic types + if (!type.IsGenericType) + throw new ArgumentException("Must be a generic type", nameof(type)); + + var elementType = type.GetGenericArguments()[0]; + + IList list; + + if (type.IsInterface) + { + // Create a concrete generic list + list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + } + else + { + list = (IList)Activator.CreateInstance(type); + } + + foreach (var value in jsonArray) + { + list.Add(DeserializeValue(elementType, value)); + } + + return list; + } + + #endregion + + #region Serialization + + internal JsonNode Serialize(object instance) => + Serialize(instance, SerializationOptions.Default); + + internal JsonNode Serialize(object instance, string[] include) => + Serialize(instance, new SerializationOptions { Include = include }); + + internal JsonNode Serialize(object instance, SerializationOptions options) + { + this.options = options; + + if (instance == null) + { + return XNull.Instance; + } + + return ReadValue(instance.GetType(), instance); + } + + #region Readers + + internal JsonArray ReadArray(IEnumerable collection) + { + var array = new XNodeArray(); + + foreach (var item in collection) + { + array.Add(ReadValue(item.GetType(), item)); + } + + return array; + } + + internal IEnumerable> ReadProperties(object instance) + { + var contract = JsonModelCache.Get(instance.GetType()); + + foreach (var member in contract.Members) + { + string name = member.Name; + + if (options.PropertyNameTransformer != null) + { + name = options.PropertyNameTransformer.Invoke(name); + } + + // Skip the field if it's not included + if ((depth == 1 && !options.IsIncluded(name))) + { + continue; + } + + var value = member.GetValue(instance); + + if (!member.EmitDefaultValue && (value == null || (member.IsList && ((IList)value).Count == 0) || value.Equals(member.DefaultValue))) + { + continue; + } + else if (options.IgnoreNullValues && value == null) // Ignore null values + { + continue; + } + + // Transform the value if there is one + if (options.Transformations != null) + { + var transform = options.GetTransformation(name); + + if (transform != null) + { + value = transform.Transformer(value); + } + } + + yield return new KeyValuePair(name, ReadValue(member.TypeDetails, value)); + } + } + + private JsonObject ReadObject(object instance) + { + depth++; + + // TODO: Guard against a self referencing graph + if (depth > options.MaxDepth) + { + depth--; + + return new JsonObject(); + } + + var node = new JsonObject(ReadProperties(instance)); + + depth--; + + return node; + } + + private JsonNode ReadValue(Type type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + var member = TypeDetails.Get(type); + + return ReadValue(member, value); + } + + private JsonNode ReadValue(TypeDetails type, object value) + { + if (value == null) + { + return XNull.Instance; + } + + if (type.JsonConverter != null) + { + return type.JsonConverter.ToJson(value); + } + else if (type.IsArray) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateArray((string[])value); + case TypeCode.UInt16: return CreateArray((ushort[])value); + case TypeCode.UInt32: return CreateArray((uint[])value); + case TypeCode.UInt64: return CreateArray((ulong[])value); + case TypeCode.Int16: return CreateArray((short[])value); + case TypeCode.Int32: return CreateArray((int[])value); + case TypeCode.Int64: return CreateArray((long[])value); + case TypeCode.Single: return CreateArray((float[])value); + case TypeCode.Double: return CreateArray((double[])value); + default: return ReadArray((IEnumerable)value); + } + } + else if (value is IEnumerable) + { + if (type.IsList && type.ElementType != null) + { + switch (Type.GetTypeCode(type.ElementType)) + { + case TypeCode.String: return CreateList(value); + case TypeCode.UInt16: return CreateList(value); + case TypeCode.UInt32: return CreateList(value); + case TypeCode.UInt64: return CreateList(value); + case TypeCode.Int16: return CreateList(value); + case TypeCode.Int32: return CreateList(value); + case TypeCode.Int64: return CreateList(value); + case TypeCode.Single: return CreateList(value); + case TypeCode.Double: return CreateList(value); + } + } + + return ReadArray((IEnumerable)value); + } + else + { + // Complex object + return ReadObject(value); + } + } + + private XList CreateList(object value) => new XList((IList)value); + + private XImmutableArray CreateArray(T[] array) => new XImmutableArray(array); + + #endregion + + #endregion + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/PropertyTransformation.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/PropertyTransformation.cs new file mode 100644 index 000000000000..e273ccffffcb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/PropertyTransformation.cs @@ -0,0 +1,21 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal class PropertyTransformation + { + internal PropertyTransformation(string name, Func transformer) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Transformer = transformer ?? throw new ArgumentNullException(nameof(transformer)); + } + + internal string Name { get; } + + internal Func Transformer { get; } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/SerializationOptions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/SerializationOptions.cs new file mode 100644 index 000000000000..663d15312e89 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Serialization/SerializationOptions.cs @@ -0,0 +1,65 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Linq; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal class SerializationOptions + { + internal static readonly SerializationOptions Default = new SerializationOptions(); + + internal SerializationOptions() { } + + internal SerializationOptions( + string[] include = null, + bool ingoreNullValues = false) + { + Include = include; + IgnoreNullValues = ingoreNullValues; + } + + internal string[] Include { get; set; } + + internal string[] Exclude { get; set; } + + internal bool IgnoreNullValues { get; set; } + + internal PropertyTransformation[] Transformations { get; set; } + + internal Func PropertyNameTransformer { get; set; } + + internal int MaxDepth { get; set; } = 5; + + internal bool IsIncluded(string name) + { + if (Exclude != null) + { + return !Exclude.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + else if (Include != null) + { + return Include.Any(exclude => exclude.Equals(name, StringComparison.OrdinalIgnoreCase)); + } + + return true; + } + + internal PropertyTransformation GetTransformation(string propertyName) + { + if (Transformations == null) return null; + + foreach (var t in Transformations) + { + if (t.Name.Equals(propertyName, StringComparison.OrdinalIgnoreCase)) + { + return t; + } + } + + return null; + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/SerializationMode.cs b/swaggerci/oracle.DefaultTag/generated/runtime/SerializationMode.cs new file mode 100644 index 000000000000..3b6a545571d7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/SerializationMode.cs @@ -0,0 +1,16 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + [System.Flags] + public enum SerializationMode + { + None = 0, + IncludeHeaders = 1 << 0, + IncludeReadOnly = 1 << 1, + + IncludeAll = IncludeHeaders | IncludeReadOnly + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/TypeConverterExtensions.cs b/swaggerci/oracle.DefaultTag/generated/runtime/TypeConverterExtensions.cs new file mode 100644 index 000000000000..e41e13b29a41 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/TypeConverterExtensions.cs @@ -0,0 +1,211 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System.IO; +using System.Linq; +using System.Xml; +using System.Xml.Serialization; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.PowerShell +{ + internal static class TypeConverterExtensions + { + internal static T[] SelectToArray(object source, System.Func converter) + { + // null begets null + if (source == null) + { + return null; + } + + // single values and strings are just encapsulated in the array. + if (source is string || !(source is System.Collections.IEnumerable)) + { + try + { + return new T[] { (T)converter(source) }; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + return new T[0]; // empty result if couldn't convert. + } + + var result = new System.Collections.Generic.List(); + foreach (var each in (System.Collections.IEnumerable)source) + { + try + { + result.Add((T)converter(each)); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // silent conversion fail + } +#endif + } + return result.ToArray(); + } + + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.Generic.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Collections.IDictionary dictionary) + { + if (null != dictionary) + { + foreach (var each in dictionary.Keys) + { + yield return each; + } + } + } + internal static System.Collections.Generic.IEnumerable GetPropertyKeys(this System.Management.Automation.PSObject instance) + { + if (null != instance) + { + foreach (var each in instance.Properties) + { + yield return each; + } + } + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.Generic.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Collections.IDictionary instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + return (null == instance || instance.Count == 0) ? + Enumerable.Empty>() : + instance.Keys.OfType() + .Where(key => + !(true == exclusions?.Contains(key?.ToString())) + && (false != inclusions?.Contains(key?.ToString()))) + .Select(key => new System.Collections.Generic.KeyValuePair(key, instance[key])); + } + + internal static System.Collections.Generic.IEnumerable> GetFilteredProperties(this System.Management.Automation.PSObject instance, global::System.Collections.Generic.HashSet exclusions = null, global::System.Collections.Generic.HashSet inclusions = null) + { + // new global::System.Collections.Generic.HashSet(System.StringComparer.InvariantCultureIgnoreCase) + return (null == instance || !instance.Properties.Any()) ? + Enumerable.Empty>() : + instance.Properties + .Where(property => + !(true == exclusions?.Contains(property.Name)) + && (false != inclusions?.Contains(property.Name))) + .Select(property => new System.Collections.Generic.KeyValuePair(property.Name, property.Value)); + } + + + internal static T GetValueForProperty(this System.Collections.Generic.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys, each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + internal static T GetValueForProperty(this System.Collections.IDictionary dictionary, string propertyName, T defaultValue, System.Func converter) + { + try + { + var key = System.Linq.Enumerable.FirstOrDefault(dictionary.Keys.OfType(), each => System.String.Equals(each.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return key == null ? defaultValue : (T)converter(dictionary[key]); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static T GetValueForProperty(this System.Management.Automation.PSObject psObject, string propertyName, T defaultValue, System.Func converter) + { + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + return property == null ? defaultValue : (T)converter(property.Value); + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return defaultValue; + } + + internal static bool Contains(this System.Management.Automation.PSObject psObject, string propertyName) + { + bool result = false; + try + { + var property = System.Linq.Enumerable.FirstOrDefault(psObject.Properties, each => System.String.Equals(each.Name.ToString(), propertyName, System.StringComparison.CurrentCultureIgnoreCase)); + result = property == null ? false : true; + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + } +#endif + return result; + } + } +} diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/UndeclaredResponseException.cs b/swaggerci/oracle.DefaultTag/generated/runtime/UndeclaredResponseException.cs new file mode 100644 index 000000000000..838818c49b03 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/UndeclaredResponseException.cs @@ -0,0 +1,112 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System; + using System.Net.Http; + using System.Net.Http.Headers; + using static Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Extensions; + + public class RestException : Exception, IDisposable + { + public System.Net.HttpStatusCode StatusCode { get; set; } + public string Code { get; protected set; } + protected string message; + public HttpRequestMessage RequestMessage { get; protected set; } + public HttpResponseHeaders ResponseHeaders { get; protected set; } + + public string ResponseBody { get; protected set; } + public string ClientRequestId { get; protected set; } + public string RequestId { get; protected set; } + + public override string Message => message; + public string Action { get; protected set; } + + public RestException(System.Net.Http.HttpResponseMessage response) + { + StatusCode = response.StatusCode; + //CloneWithContent will not work here since the content is disposed after sendAsync + //Besides, it seems there is no need for the request content cloned here. + RequestMessage = response.RequestMessage.Clone(); + ResponseBody = response.Content.ReadAsStringAsync().Result; + ResponseHeaders = response.Headers; + + RequestId = response.GetFirstHeader("x-ms-request-id"); + ClientRequestId = response.GetFirstHeader("x-ms-client-request-id"); + + try + { + // try to parse the body as JSON, and see if a code and message are in there. + var json = Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonNode.Parse(ResponseBody) as Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json.JsonObject; + + // error message could be in properties.statusMessage + { message = If(json?.Property("properties"), out var p) + && If(p?.PropertyT("statusMessage"), out var sm) + ? (string)sm : (string)Message; } + + // see if there is an error block in the body + json = json?.Property("error") ?? json; + + { Code = If(json?.PropertyT("code"), out var c) ? (string)c : (string)StatusCode.ToString(); } + { message = If(json?.PropertyT("message"), out var m) ? (string)m : (string)Message; } + { Action = If(json?.PropertyT("action"), out var a) ? (string)a : (string)Action; } + } +#if DEBUG + catch (System.Exception E) + { + System.Console.Error.WriteLine($"{E.GetType().Name}/{E.Message}/{E.StackTrace}"); + } +#else + catch + { + // couldn't get the code/message from the body response. + // In this case, we will assume the response is the expected error message + if(!string.IsNullOrEmpty(ResponseBody)) { + message = ResponseBody; + } + } +#endif + if (string.IsNullOrEmpty(message)) + { + if (StatusCode >= System.Net.HttpStatusCode.BadRequest && StatusCode < System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Request Error, Status: {StatusCode}"; + } + else if (StatusCode >= System.Net.HttpStatusCode.InternalServerError) + { + message = $"The server responded with a Server Error, Status: {StatusCode}"; + } + else + { + message = $"The server responded with an unrecognized response, Status: {StatusCode}"; + } + } + } + + public void Dispose() + { + ((IDisposable)RequestMessage).Dispose(); + } + } + + public class RestException : RestException + { + public T Error { get; protected set; } + public RestException(System.Net.Http.HttpResponseMessage response, T error) : base(response) + { + Error = error; + } + } + + + public class UndeclaredResponseException : RestException + { + public UndeclaredResponseException(System.Net.Http.HttpResponseMessage response) : base(response) + { + + } + } +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/Writers/JsonWriter.cs b/swaggerci/oracle.DefaultTag/generated/runtime/Writers/JsonWriter.cs new file mode 100644 index 000000000000..0fd8542c271b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/Writers/JsonWriter.cs @@ -0,0 +1,223 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ +using System; +using System.Collections.Generic; +using System.IO; +using System.Web; + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.Json +{ + internal class JsonWriter + { + const string indentation = " "; // 2 spaces + + private readonly bool pretty; + private readonly TextWriter writer; + + protected int currentLevel = 0; + + internal JsonWriter(TextWriter writer, bool pretty = true) + { + this.writer = writer ?? throw new ArgumentNullException(nameof(writer)); + this.pretty = pretty; + } + + internal void WriteNode(JsonNode node) + { + switch (node.Type) + { + case JsonType.Array: WriteArray((IEnumerable)node); break; + case JsonType.Object: WriteObject((JsonObject)node); break; + + // Primitives + case JsonType.Binary: WriteBinary((XBinary)node); break; + case JsonType.Boolean: WriteBoolean((bool)node); break; + case JsonType.Date: WriteDate((JsonDate)node); break; + case JsonType.Null: WriteNull(); break; + case JsonType.Number: WriteNumber((JsonNumber)node); break; + case JsonType.String: WriteString(node); break; + } + } + + internal void WriteArray(IEnumerable array) + { + currentLevel++; + + writer.Write('['); + + bool doIndentation = false; + + if (pretty) + { + foreach (var node in array) + { + if (node.Type == JsonType.Object || node.Type == JsonType.Array) + { + doIndentation = true; + + break; + } + } + } + + bool isFirst = true; + + foreach (JsonNode node in array) + { + if (!isFirst) writer.Write(','); + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + WriteNode(node); + + isFirst = false; + } + + currentLevel--; + + if (doIndentation) + { + WriteIndent(); + } + else if (pretty) + { + writer.Write(' '); + } + + writer.Write(']'); + } + + internal void WriteIndent() + { + if (pretty) + { + writer.Write(Environment.NewLine); + + for (int level = 0; level < currentLevel; level++) + { + writer.Write(indentation); + } + } + } + + internal void WriteObject(JsonObject obj) + { + currentLevel++; + + writer.Write('{'); + + bool isFirst = true; + + foreach (var field in obj) + { + if (!isFirst) writer.Write(','); + + WriteIndent(); + + WriteFieldName(field.Key); + + writer.Write(':'); + + if (pretty) + { + writer.Write(' '); + } + + // Write the field value + WriteNode(field.Value); + + isFirst = false; + } + + currentLevel--; + + WriteIndent(); + + writer.Write('}'); + } + + internal void WriteFieldName(string fieldName) + { + writer.Write('"'); + writer.Write(HttpUtility.JavaScriptStringEncode(fieldName)); + writer.Write('"'); + } + + #region Primitives + + internal void WriteBinary(XBinary value) + { + writer.Write('"'); + writer.Write(value.ToString()); + writer.Write('"'); + } + + internal void WriteBoolean(bool value) + { + writer.Write(value ? "true" : "false"); + } + + internal void WriteDate(JsonDate date) + { + if (date.ToDateTime().Year == 1) + { + WriteNull(); + } + else + { + writer.Write('"'); + writer.Write(date.ToIsoString()); + writer.Write('"'); + } + } + + internal void WriteNull() + { + writer.Write("null"); + } + + internal void WriteNumber(JsonNumber number) + { + if (number.Overflows) + { + writer.Write('"'); + writer.Write(number.Value); + writer.Write('"'); + } + else + { + writer.Write(number.Value); + } + } + + internal void WriteString(string text) + { + if (text == null) + { + WriteNull(); + } + else + { + writer.Write('"'); + + writer.Write(HttpUtility.JavaScriptStringEncode(text)); + + writer.Write('"'); + } + } + + #endregion + } +} + + +// TODO: Replace with System.Text.Json when available diff --git a/swaggerci/oracle.DefaultTag/generated/runtime/delegates.cs b/swaggerci/oracle.DefaultTag/generated/runtime/delegates.cs new file mode 100644 index 000000000000..bf6add573f1e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/generated/runtime/delegates.cs @@ -0,0 +1,23 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +namespace Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Net.Http; + using System.Threading; + using System.Threading.Tasks; + using GetEventData=System.Func; + + public delegate Task SendAsync(HttpRequestMessage request, IEventListener callback); + public delegate Task SendAsyncStep(HttpRequestMessage request, IEventListener callback, ISendAsync next); + public delegate Task SignalEvent(string id, CancellationToken token, GetEventData getEventData); + public delegate Task Event(EventData message); + public delegate void SynchEvent(EventData message); + public delegate Task OnResponse(Response message); + public delegate Task OnResponse(Response message); +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/how-to.md b/swaggerci/oracle.DefaultTag/how-to.md new file mode 100644 index 000000000000..ae3b51ec55fa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/how-to.md @@ -0,0 +1,58 @@ +# How-To +This document describes how to develop for `Az.OracleDatabaseResourceManager`. + +## Building `Az.OracleDatabaseResourceManager` +To build, run the `build-module.ps1` at the root of the module directory. This will generate the proxy script cmdlets that are the cmdlets being exported by this module. After the build completes, the proxy script cmdlets will be output to the `exports` folder. To read more about the proxy script cmdlets, look at the [README.md](exports/README.md) in the `exports` folder. + +## Creating custom cmdlets +To add cmdlets that were not generated by the REST specification, use the `custom` folder. This folder allows you to add handwritten `.ps1` and `.cs` files. Currently, we support using `.ps1` scripts as new cmdlets or as additional low-level variants (via `ParameterSet`), and `.cs` files as low-level (variants) cmdlets that the exported script cmdlets call. We do not support exporting any `.cs` (dll) cmdlets directly. To read more about custom cmdlets, look at the [README.md](custom/README.md) in the `custom` folder. + +## Generating documentation +To generate documentation, the process is now integrated into the `build-module.ps1` script. If you don't want to run this process as part of `build-module.ps1`, you can provide the `-NoDocs` switch. If you want to run documentation generation after the build process, you may still run the `generate-help.ps1` script. Overall, the process will look at the documentation comments in the generated and custom cmdlets and types, and create `.md` files into the `docs` folder. Additionally, this pulls in any examples from the `examples` folder and adds them to the generated help markdown documents. To read more about examples, look at the [README.md](examples/README.md) in the `examples` folder. To read more about documentation, look at the [README.md](docs/README.md) in the `docs` folder. + +## Testing `Az.OracleDatabaseResourceManager` +To test the cmdlets, we use [Pester](https://github.com/pester/Pester). Tests scripts (`.ps1`) should be added to the `test` folder. To execute the Pester tests, run the `test-module.ps1` script. This will run all tests in `playback` mode within the `test` folder. To read more about testing cmdlets, look at the [README.md](examples/README.md) in the `examples` folder. + +## Packing `Az.OracleDatabaseResourceManager` +To pack `Az.OracleDatabaseResourceManager` for distribution, run the `pack-module.ps1` script. This will take the contents of multiple directories and certain root-folder files to create a `.nupkg`. The structure of the `.nupkg` is created so it can be loaded part of a [PSRepository](https://learn.microsoft.com/powershell/module/powershellget/register-psrepository). Additionally, this package is in a format for distribution to the [PSGallery](https://www.powershellgallery.com/). For signing an Azure module, please contact the [Azure PowerShell](https://github.com/Azure/azure-powershell) team. + +## Module Script Details +There are multiple scripts created for performing different actions for developing `Az.OracleDatabaseResourceManager`. +- `build-module.ps1` + - Builds the module DLL (`./bin/Az.OracleDatabaseResourceManager.private.dll`), creates the exported cmdlets and documentation, generates custom cmdlet test stubs and exported cmdlet example stubs, and updates `./Az.OracleDatabaseResourceManager.psd1` with Azure profile information. + - **Parameters**: [`Switch` parameters] + - `-Run`: After building, creates an isolated PowerShell session and loads `Az.OracleDatabaseResourceManager`. + - `-Test`: After building, runs the `Pester` tests defined in the `test` folder. + - `-Docs`: After building, generates the Markdown documents for the modules into the `docs` folder. + - `-Pack`: After building, packages the module into a `.nupkg`. + - `-Code`: After building, opens a VSCode window with the module's directory and runs (see `-Run`) the module. + - `-Release`: Builds the module in `Release` configuration (as opposed to `Debug` configuration). + - `-NoDocs`: Supresses writing the documentation markdown files as part of the cmdlet exporting process. + - `-Debugger`: Used when attaching the debugger in Visual Studio to the PowerShell session, and running the build process without recompiling the DLL. This suppresses running the script as an isolated process. +- `run-module.ps1` + - Creates an isolated PowerShell session and loads `Az.OracleDatabaseResourceManager` into the session. + - Same as `-Run` in `build-module.ps1`. + - **Parameters**: [`Switch` parameters] + - `-Code`: Opens a VSCode window with the module's directory. + - Same as `-Code` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. +- `test-module.ps1` + - Runs the `Pester` tests defined in the `test` folder. + - Same as `-Test` in `build-module.ps1`. +- `pack-module.ps1` + - Packages the module into a `.nupkg` for distribution. + - Same as `-Pack` in `build-module.ps1`. +- `generate-help.ps1` + - Generates the Markdown documents for the modules into the `docs` folder. + - Same as `-Docs` in `build-module.ps1`. + - This process is now integrated into `build-module.ps1` automatically. To disable, use `-NoDocs` when running `build-module.ps1`. +- `export-surface.ps1` + - Generates Markdown documents for both the cmdlet surface and the model (class) surface of the module. + - These files are placed into the `resources` folder. + - Used for investigating the surface of your module. These are *not* documentation for distribution. +- `check-dependencies.ps1` + - Used in `run-module.ps1` and `test-module.ps1` to verify dependent modules are available to run those tasks. + - It will download local (within the module's directory structure) versions of those modules as needed. + - This script *does not* need to be ran by-hand. \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/internal/Az.OracleDatabaseResourceManager.internal.psm1 b/swaggerci/oracle.DefaultTag/internal/Az.OracleDatabaseResourceManager.internal.psm1 new file mode 100644 index 000000000000..bbffd5c17ce9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/internal/Az.OracleDatabaseResourceManager.internal.psm1 @@ -0,0 +1,38 @@ +# region Generated + # Load the private module dll + $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '../bin/Az.OracleDatabaseResourceManager.private.dll') + + # Get the private module's instance + $instance = [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Module]::Instance + + # Export nothing to clear implicit exports + Export-ModuleMember + + # Export proxy cmdlet scripts + $exportsPath = $PSScriptRoot + $directories = Get-ChildItem -Directory -Path $exportsPath + $profileDirectory = $null + if($instance.ProfileName) { + if(($directories | ForEach-Object { $_.Name }) -contains $instance.ProfileName) { + $profileDirectory = $directories | Where-Object { $_.Name -eq $instance.ProfileName } + } else { + # Don't export anything if the profile doesn't exist for the module + $exportsPath = $null + Write-Warning "Selected Azure profile '$($instance.ProfileName)' does not exist for module '$($instance.Name)'. No cmdlets were loaded." + } + } elseif(($directories | Measure-Object).Count -gt 0) { + # Load the last folder if no profile is selected + $profileDirectory = $directories | Select-Object -Last 1 + } + + if($profileDirectory) { + Write-Information "Loaded Azure profile '$($profileDirectory.Name)' for module '$($instance.Name)'" + $exportsPath = $profileDirectory.FullName + } + + if($exportsPath) { + Get-ChildItem -Path $exportsPath -Recurse -Include '*.ps1' -File | ForEach-Object { . $_.FullName } + $cmdletNames = Get-ScriptCmdlet -ScriptFolder $exportsPath + Export-ModuleMember -Function $cmdletNames -Alias (Get-ScriptCmdlet -ScriptFolder $exportsPath -AsAlias) + } +# endregion diff --git a/swaggerci/oracle.DefaultTag/internal/Get-AzOracleDatabaseResourceManagerOperation.ps1 b/swaggerci/oracle.DefaultTag/internal/Get-AzOracleDatabaseResourceManagerOperation.ps1 new file mode 100644 index 000000000000..c6f024cacc19 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/internal/Get-AzOracleDatabaseResourceManagerOperation.ps1 @@ -0,0 +1,117 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroperation +#> +function Get-AzOracleDatabaseResourceManagerOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/internal/ProxyCmdletDefinitions.ps1 b/swaggerci/oracle.DefaultTag/internal/ProxyCmdletDefinitions.ps1 new file mode 100644 index 000000000000..c6f024cacc19 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/internal/ProxyCmdletDefinitions.ps1 @@ -0,0 +1,117 @@ + +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- + +<# +.Synopsis +List the operations for the provider +.Description +List the operations for the provider +.Example +{{ Add code here }} +.Example +{{ Add code here }} + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation +.Link +https://learn.microsoft.com/powershell/module/az.oracledatabaseresourcemanager/get-azoracledatabaseresourcemanageroperation +#> +function Get-AzOracleDatabaseResourceManagerOperation { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Models.Api50.IOperation])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Azure')] + [System.Management.Automation.PSObject] + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + ${DefaultProfile}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Wait for .NET debugger to attach + ${Break}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be appended to the front of the pipeline + ${HttpPipelineAppend}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Runtime.SendAsyncStep[]] + # SendAsync Pipeline Steps to be prepended to the front of the pipeline + ${HttpPipelinePrepend}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Uri] + # The URI for the proxy server to use + ${Proxy}, + + [Parameter(DontShow)] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.PSCredential] + # Credentials for a proxy server to use for the remote call + ${ProxyCredential}, + + [Parameter(DontShow)] + [Microsoft.Azure.PowerShell.Cmdlets.OracleDatabaseResourceManager.Category('Runtime')] + [System.Management.Automation.SwitchParameter] + # Use the default credentials for the proxy + ${ProxyUseDefaultCredentials} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + $mapping = @{ + List = 'Az.OracleDatabaseResourceManager.private\Get-AzOracleDatabaseResourceManagerOperation_List'; + } + + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $scriptCmd = {& $wrappedCmd @PSBoundParameters} + $steppablePipeline = $scriptCmd.GetSteppablePipeline($MyInvocation.CommandOrigin) + $steppablePipeline.Begin($PSCmdlet) + } catch { + + throw + } +} + +process { + try { + $steppablePipeline.Process($_) + } catch { + + throw + } + +} +end { + try { + $steppablePipeline.End() + + } catch { + + throw + } +} +} diff --git a/swaggerci/oracle.DefaultTag/internal/README.md b/swaggerci/oracle.DefaultTag/internal/README.md new file mode 100644 index 000000000000..6d136484124b --- /dev/null +++ b/swaggerci/oracle.DefaultTag/internal/README.md @@ -0,0 +1,14 @@ +# Internal +This directory contains a module to handle *internal only* cmdlets. Cmdlets that you **hide** in configuration are created here. For more information on hiding, see [cmdlet hiding](https://github.com/Azure/autorest.powershell/blob/main/docs/directives.md#cmdlet-hiding-exportation-suppression). The cmdlets in this directory are generated at **build-time**. Do not put any custom code, files, cmdlets, etc. into this directory. Please use `../custom` for all custom implementation. + +## Info +- Modifiable: no +- Generated: all +- Committed: no +- Packaged: yes + +## Details +The `Az.OracleDatabaseResourceManager.internal.psm1` file is generated to this folder. This module file handles the hidden cmdlets. These cmdlets will not be exported by `Az.OracleDatabaseResourceManager`. Instead, this sub-module is imported by the `../custom/Az.OracleDatabaseResourceManager.custom.psm1` module, allowing you to use hidden cmdlets in your custom, exposed cmdlets. To call these cmdlets in your custom scripts, simply use [module-qualified calls](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_command_precedence?view=powershell-6#qualified-names). For example, `Az.OracleDatabaseResourceManager.internal\Get-Example` would call an internal cmdlet named `Get-Example`. + +## Purpose +This allows you to include REST specifications for services that you *do not wish to expose from your module*, but simply want to call within custom cmdlets. For example, if you want to make a custom cmdlet that uses `Storage` services, you could include a simplified `Storage` REST specification that has only the operations you need. When you run the generator and build this module, note the generated `Storage` cmdlets. Then, in your readme configuration, use [cmdlet hiding](https://github.com/Azure/autorest/blob/master/docs/powershell/options.md#cmdlet-hiding-exportation-suppression) on the `Storage` cmdlets and they will *only be exposed to the custom cmdlets* you want to write, and not be exported as part of `Az.OracleDatabaseResourceManager`. diff --git a/swaggerci/oracle.DefaultTag/license.txt b/swaggerci/oracle.DefaultTag/license.txt new file mode 100644 index 000000000000..b9f3180fb9af --- /dev/null +++ b/swaggerci/oracle.DefaultTag/license.txt @@ -0,0 +1,227 @@ +MICROSOFT SOFTWARE LICENSE TERMS + +MICROSOFT AZURE POWERSHELL + +These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. + +BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE. + + +-----------------START OF LICENSE-------------------------- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +-------------------END OF LICENSE------------------------------------------ + + +----------------START OF THIRD PARTY NOTICE-------------------------------- + + +The software includes the AutoMapper library ("AutoMapper"). The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Provided for Informational Purposes Only + +AutoMapper + +The MIT License (MIT) +Copyright (c) 2010 Jimmy Bogard + + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + + + + + +*************** + +The software includes Newtonsoft.Json. The MIT License set out below is provided for informational purposes only. It is not the license that governs any part of the software. + +Newtonsoft.Json + +The MIT License (MIT) +Copyright (c) 2007 James Newton-King +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------END OF THIRD PARTY NOTICE---------------------------------------- + diff --git a/swaggerci/oracle.DefaultTag/pack-module.ps1 b/swaggerci/oracle.DefaultTag/pack-module.ps1 new file mode 100644 index 000000000000..8ed48957e579 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/pack-module.ps1 @@ -0,0 +1,9 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +Write-Host -ForegroundColor Green 'Packing module...' +dotnet pack $PSScriptRoot --no-build /nologo +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/readme.md b/swaggerci/oracle.DefaultTag/readme.md new file mode 100644 index 000000000000..1adb99d2d26a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/readme.md @@ -0,0 +1,10 @@ +### AutoRest Configuration +> see https://aka.ms/autorest + +``` yaml +require: + - $(this-folder)/../../tools/SwaggerCI/readme.azure.noprofile.md + - $(this-folder)/../../../azure-rest-api-specs/specification/oracle/resource-manager/readme.md +try-require: + - $(this-folder)/../../../azure-rest-api-specs/specification/oracle/resource-manager/readme.powershell.md +``` diff --git a/swaggerci/oracle.DefaultTag/resources/README.md b/swaggerci/oracle.DefaultTag/resources/README.md new file mode 100644 index 000000000000..736492341e3d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/resources/README.md @@ -0,0 +1,11 @@ +# Resources +This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `../custom` folder. + +## Info +- Modifiable: yes +- Generated: no +- Committed: yes +- Packaged: no + +## Purpose +Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/run-module.ps1 b/swaggerci/oracle.DefaultTag/run-module.ps1 new file mode 100644 index 000000000000..b5be8d34f4ba --- /dev/null +++ b/swaggerci/oracle.DefaultTag/run-module.ps1 @@ -0,0 +1,54 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Code) +$ErrorActionPreference = 'Stop' + +if(-not $Isolated) { + Write-Host -ForegroundColor Green 'Creating isolated process...' + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NoExit -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +$isAzure = $true +if($isAzure) { + . (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts + # Load the latest version of Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated/modules' +if(Test-Path -Path $localModulesPath) { + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.OracleDatabaseResourceManager.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +function Prompt { + Write-Host -NoNewline -ForegroundColor Green "PS $(Get-Location)" + Write-Host -NoNewline -ForegroundColor Gray ' [' + Write-Host -NoNewline -ForegroundColor White -BackgroundColor DarkCyan $moduleName + ']> ' +} + +# where we would find the launch.json file +$vscodeDirectory = New-Item -ItemType Directory -Force -Path (Join-Path $PSScriptRoot '.vscode') +$launchJson = Join-Path $vscodeDirectory 'launch.json' + +# if there is a launch.json file, let's just assume -Code, and update the file +if(($Code) -or (test-Path $launchJson) ) { + $launchContent = '{ "version": "0.2.0", "configurations":[{ "name":"Attach to PowerShell", "type":"coreclr", "request":"attach", "processId":"' + ([System.Diagnostics.Process]::GetCurrentProcess().Id) + '", "justMyCode":false }] }' + Set-Content -Path $launchJson -Value $launchContent + if($Code) { + # only launch vscode if they say -code + code $PSScriptRoot + } +} + +Import-Module -Name $modulePath \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/test-module.ps1 b/swaggerci/oracle.DefaultTag/test-module.ps1 new file mode 100644 index 000000000000..8cb489d09367 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test-module.ps1 @@ -0,0 +1,90 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +param([switch]$Isolated, [switch]$Live, [switch]$Record, [switch]$Playback, [switch]$RegenerateSupportModule, [switch]$UsePreviousConfigForRecord, [string[]]$TestName) +$ErrorActionPreference = 'Stop' + +if(-not $Isolated) +{ + Write-Host -ForegroundColor Green 'Creating isolated process...' + if ($PSBoundParameters.ContainsKey("TestName")) { + $PSBoundParameters["TestName"] = $PSBoundParameters["TestName"] -join "," + } + $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().Path + & "$pwsh" -NonInteractive -NoLogo -NoProfile -File $MyInvocation.MyCommand.Path @PSBoundParameters -Isolated + return +} + +# This is a workaround, since for string array parameter, pwsh -File will only take the first element +if ($PSBoundParameters.ContainsKey("TestName") -and ($TestName.count -eq 1) -and ($TestName[0].Contains(','))) { + $TestName = $TestName[0].Split(",") +} + +$ProgressPreference = 'SilentlyContinue' +$baseName = $PSScriptRoot.BaseName +$requireResourceModule = (($baseName -ne "Resources") -and ($Record.IsPresent -or $Live.IsPresent)) +. (Join-Path $PSScriptRoot 'check-dependencies.ps1') -Isolated -Accounts:$false -Pester -Resources:$requireResourceModule -RegenerateSupportModule:$RegenerateSupportModule +. ("$PSScriptRoot\test\utils.ps1") + +if ($requireResourceModule) +{ + # Load the latest Az.Accounts installed + Import-Module -Name Az.Accounts -RequiredVersion (Get-Module -Name Az.Accounts -ListAvailable | Sort-Object -Property Version -Descending)[0].Version + $resourceModulePSD = Get-Item -Path (Join-Path $HOME '.PSSharedModules\Resources\Az.Resources.TestSupport.psd1') + Import-Module -Name $resourceModulePSD.FullName +} + +$localModulesPath = Join-Path $PSScriptRoot 'generated/modules' +if(Test-Path -Path $localModulesPath) +{ + $env:PSModulePath = "$localModulesPath$([IO.Path]::PathSeparator)$env:PSModulePath" +} + +$modulePsd1 = Get-Item -Path (Join-Path $PSScriptRoot './Az.OracleDatabaseResourceManager.psd1') +$modulePath = $modulePsd1.FullName +$moduleName = $modulePsd1.BaseName + +Import-Module -Name Pester +Import-Module -Name $modulePath + +$TestMode = 'playback' +$ExcludeTag = @("LiveOnly") +if($Live) +{ + $TestMode = 'live' + $ExcludeTag = @() +} +if($Record) +{ + $TestMode = 'record' +} +try +{ + if ($TestMode -ne 'playback') + { + setupEnv + } else { + $env:AzPSAutorestTestPlaybackMode = $true + } + $testFolder = Join-Path $PSScriptRoot 'test' + if ($null -ne $TestName) + { + Invoke-Pester -Script @{ Path = $testFolder } -TestName $TestName -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } else { + Invoke-Pester -Script @{ Path = $testFolder } -ExcludeTag $ExcludeTag -EnableExit -OutputFile (Join-Path $testFolder "$moduleName-TestResults.xml") + } +} Finally +{ + if ($TestMode -ne 'playback') + { + cleanupEnv + } + else { + $env:AzPSAutorestTestPlaybackMode = '' + } +} + +Write-Host -ForegroundColor Green '-------------Done-------------' \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.Tests.ps1 new file mode 100644 index 000000000000..55770e152c80 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Add-AzOracleDatabaseResourceManagerCloudExadataInfrastructureStorageCapacity' { + It 'Add' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'AddViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.Tests.ps1 new file mode 100644 index 000000000000..b91cf00560e3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Add-AzOracleDatabaseResourceManagerCloudVMClusterVM')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Add-AzOracleDatabaseResourceManagerCloudVMClusterVM.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Add-AzOracleDatabaseResourceManagerCloudVMClusterVM' { + It 'AddExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Add' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'AddViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'AddViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.Tests.ps1 new file mode 100644 index 000000000000..fe2ed8915006 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Add-AzOracleDatabaseResourceManagerOracleSubscriptionAzureSubscription' { + It 'AddExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Add' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'AddViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'AddViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.Tests.ps1 new file mode 100644 index 000000000000..6e6d23fb0e14 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabase.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomouDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomouDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomouDatabase' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..bfcbbb01b9b3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.Tests.ps1 new file mode 100644 index 000000000000..894d522071d7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseCharacterSet' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.Tests.ps1 new file mode 100644 index 000000000000..239fa970baac --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseNationalCharacterSet' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.Tests.ps1 new file mode 100644 index 000000000000..694a8fc75d9d --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomouDatabaseVersion' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..c2ab56e9b5de --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomousDatabase' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..422a639e1282 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.Tests.ps1 new file mode 100644 index 000000000000..36b7ec3b1d18 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseCharacterSet' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.Tests.ps1 new file mode 100644 index 000000000000..dc37ebd789fc --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseNationalCharacterSet' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.Tests.ps1 new file mode 100644 index 000000000000..a819914d60ef --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerAutonomousDatabaseVersion' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..c2391a187ea9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerCloudExadataInfrastructure' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..3a82714f5e17 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerCloudVMCluster' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.Tests.ps1 new file mode 100644 index 000000000000..b014794d0919 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerCloudVMClusterPrivateIpaddress' { + It 'ListExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbNode.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbNode.Tests.ps1 new file mode 100644 index 000000000000..846ff3be6003 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbNode.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerDbNode')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerDbNode.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerDbNode' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbServer.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbServer.Tests.ps1 new file mode 100644 index 000000000000..61f8fa38365a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbServer.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerDbServer')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerDbServer.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerDbServer' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbSystemShape.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbSystemShape.Tests.ps1 new file mode 100644 index 000000000000..2ae7f25e2d40 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDbSystemShape.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerDbSystemShape')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerDbSystemShape.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerDbSystemShape' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDnsPrivateView.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDnsPrivateView.Tests.ps1 new file mode 100644 index 000000000000..b9d8f2c7ea5a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDnsPrivateView.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerDnsPrivateView')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerDnsPrivateView.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerDnsPrivateView' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.Tests.ps1 new file mode 100644 index 000000000000..d80c2233878c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerDnsPrivateZone.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerDnsPrivateZone')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerDnsPrivateZone.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerDnsPrivateZone' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 new file mode 100644 index 000000000000..1f3be77412d8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerExadbVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerExadbVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerExadbVMCluster' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExascaleDbNode.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExascaleDbNode.Tests.ps1 new file mode 100644 index 000000000000..fbd926f47810 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExascaleDbNode.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerExascaleDbNode')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerExascaleDbNode.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerExascaleDbNode' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 new file mode 100644 index 000000000000..7d6482874937 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerExascaleDbStorageVault' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List1' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerFlexComponent.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerFlexComponent.Tests.ps1 new file mode 100644 index 000000000000..c372d1bb18ae --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerFlexComponent.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerFlexComponent')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerFlexComponent.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerFlexComponent' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerGiMinorVersion.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerGiMinorVersion.Tests.ps1 new file mode 100644 index 000000000000..0e0458e75eda --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerGiMinorVersion.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerGiMinorVersion')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerGiMinorVersion.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerGiMinorVersion' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerGiVersion.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerGiVersion.Tests.ps1 new file mode 100644 index 000000000000..987714a4d0e0 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerGiVersion.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerGiVersion')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerGiVersion.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerGiVersion' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 new file mode 100644 index 000000000000..1fd83d49e8ca --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerOracleSubscription')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerOracleSubscription.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerOracleSubscription' { + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.Tests.ps1 new file mode 100644 index 000000000000..e1152d381869 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionActivationLink' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.Tests.ps1 new file mode 100644 index 000000000000..c0a1b3c763a3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionCloudAccountDetail' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.Tests.ps1 new file mode 100644 index 000000000000..e0a423b52ea6 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerOracleSubscriptionSaaSubscriptionDetail' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerSystemVersion.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerSystemVersion.Tests.ps1 new file mode 100644 index 000000000000..43bbf82f49fd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerSystemVersion.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerSystemVersion')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerSystemVersion.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerSystemVersion' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 new file mode 100644 index 000000000000..059cf5c2ad9c --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzOracleDatabaseResourceManagerVirtualNetworkAddress' { + It 'List' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Get' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerActionDbNode.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerActionDbNode.Tests.ps1 new file mode 100644 index 000000000000..a3010e5e7da7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerActionDbNode.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzOracleDatabaseResourceManagerActionDbNode')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzOracleDatabaseResourceManagerActionDbNode.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzOracleDatabaseResourceManagerActionDbNode' { + It 'ActionExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Action' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.Tests.ps1 new file mode 100644 index 000000000000..b5974e0743d4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzOracleDatabaseResourceManagerActionExascaleDbNode' { + It 'ActionExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Action' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ActionViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.Tests.ps1 new file mode 100644 index 000000000000..62082d8aac1f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzOracleDatabaseResourceManagerShrinkAutonomouDatabase' { + It 'Shrink' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ShrinkViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.Tests.ps1 new file mode 100644 index 000000000000..c287aabf8fce --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzOracleDatabaseResourceManagerSwitchoverAutonomouDatabase' { + It 'SwitchoverExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Switchover' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'SwitchoverViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'SwitchoverViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabase.Tests.ps1 new file mode 100644 index 000000000000..c16b4f343f06 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabase.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerAutonomouDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerAutonomouDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerAutonomouDatabase' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..d6aa2bdf5159 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseBackup' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.Tests.ps1 new file mode 100644 index 000000000000..0c5fa81fc7d8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerAutonomouDatabaseWallet' { + It 'GenerateViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Generate' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'GenerateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..6f1c3e5b8079 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerCloudExadataInfrastructure' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..895db7627997 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerCloudVMCluster' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 new file mode 100644 index 000000000000..7d7c14485073 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerExadbVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerExadbVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerExadbVMCluster' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 new file mode 100644 index 000000000000..2dfb390237bd --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerExascaleDbStorageVault')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerExascaleDbStorageVault' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 new file mode 100644 index 000000000000..be9d45bbb438 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerOracleSubscription')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerOracleSubscription.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerOracleSubscription' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 new file mode 100644 index 000000000000..9147b787b8bb --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzOracleDatabaseResourceManagerVirtualNetworkAddress')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzOracleDatabaseResourceManagerVirtualNetworkAddress' { + It 'CreateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/README.md b/swaggerci/oracle.DefaultTag/test/README.md new file mode 100644 index 000000000000..1969200c6a09 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/README.md @@ -0,0 +1,17 @@ +# Test +This directory contains the [Pester](https://www.powershellgallery.com/packages/Pester) tests to run for the module. We use Pester as it is the unofficial standard for PowerShell unit testing. Test stubs for custom cmdlets (created in `../custom`) will be generated into this folder when `build-module.ps1` is ran. These test stubs will fail automatically, to indicate that tests should be written for custom cmdlets. + +## Info +- Modifiable: yes +- Generated: partial +- Committed: yes +- Packaged: no + +## Details +We allow three testing modes: *live*, *record*, and *playback*. These can be selected using the `-Live`, `-Record`, and `-Playback` switches respectively on the `test-module.ps1` script. This script will run through any `.Tests.ps1` scripts in the `test` folder. If you choose the *record* mode, it will create a `.Recording.json` file of the REST calls between the client and server. Then, when you choose *playback* mode, it will use the `.Recording.json` file to mock the communication between server and client. The *live* mode runs the same as the *record* mode; however, it doesn't create the `.Recording.json` file. + +## Purpose +Custom cmdlets generally encompass additional functionality not described in the REST specification, or combines functionality generated from the REST spec. To validate this functionality continues to operate as intended, creating tests that can be ran and re-ran against custom cmdlets is part of the framework. + +## Usage +To execute tests, run the `test-module.ps1`. To write tests, [this example](https://github.com/pester/Pester/blob/8b9cf4248315e44f1ac6673be149f7e0d7f10466/Examples/Planets/Get-Planet.Tests.ps1#L1) from the Pester repository is very useful for getting started. \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..9829566809aa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabase' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..19c2f09d65c5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..461440c55708 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerCloudExadataInfrastructure' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..ac98189c4ad7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerCloudVMCluster' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.Tests.ps1 new file mode 100644 index 000000000000..9c76e8bdc99e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerCloudVMClusterVM' { + It 'RemoveExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Remove' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RemoveViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RemoveViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 new file mode 100644 index 000000000000..8cc5193eb1c8 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerExadbVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerExadbVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerExadbVMCluster' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.Tests.ps1 new file mode 100644 index 000000000000..6f07da61aa95 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerExadbVMClusterVM' { + It 'RemoveViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RemoveExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Remove' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RemoveViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 new file mode 100644 index 000000000000..3340fc52810a --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerExascaleDbStorageVault' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 new file mode 100644 index 000000000000..ad27d7dae75f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerOracleSubscription')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerOracleSubscription.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerOracleSubscription' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 new file mode 100644 index 000000000000..fc0206799aa2 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzOracleDatabaseResourceManagerVirtualNetworkAddress' { + It 'Delete' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'DeleteViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.Tests.ps1 new file mode 100644 index 000000000000..2ca94e824037 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Rename-AzOracleDatabaseResourceManagerAutonomouDatabaseDisasterRecoveryConfiguration' { + It 'ChangeExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Change' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ChangeViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'ChangeViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..8509759e8fe5 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 @@ -0,0 +1,33 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Restore-AzOracleDatabaseResourceManagerAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Restore-AzOracleDatabaseResourceManagerAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Restore-AzOracleDatabaseResourceManagerAutonomousDatabase' { + It 'RestoreExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'Restore' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RestoreViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'RestoreViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 new file mode 100644 index 000000000000..a82e36ef675e --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerAutonomousDatabase.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleDatabaseResourceManagerAutonomousDatabase')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleDatabaseResourceManagerAutonomousDatabase.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleDatabaseResourceManagerAutonomousDatabase' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 new file mode 100644 index 000000000000..46b987c2fae3 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleDatabaseResourceManagerAutonomousDatabaseBackup' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 new file mode 100644 index 000000000000..4f4d8b34afb7 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleDatabaseResourceManagerCloudExadataInfrastructure' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 new file mode 100644 index 000000000000..c8631b0bcac4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerCloudVMCluster.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleDatabaseResourceManagerCloudVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleDatabaseResourceManagerCloudVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleDatabaseResourceManagerCloudVMCluster' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 new file mode 100644 index 000000000000..debe3742bbaa --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerExadbVMCluster.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleDatabaseResourceManagerExadbVMCluster')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleDatabaseResourceManagerExadbVMCluster.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleDatabaseResourceManagerExadbVMCluster' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 new file mode 100644 index 000000000000..bd0d4be5f8d9 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleDatabaseResourceManagerExascaleDbStorageVault' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 new file mode 100644 index 000000000000..e0a20bbaad0f --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/Update-AzOracleDatabaseResourceManagerOracleSubscription.Tests.ps1 @@ -0,0 +1,25 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Update-AzOracleDatabaseResourceManagerOracleSubscription')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Update-AzOracleDatabaseResourceManagerOracleSubscription.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Update-AzOracleDatabaseResourceManagerOracleSubscription' { + It 'UpdateExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } + + It 'UpdateViaIdentityExpanded' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/swaggerci/oracle.DefaultTag/test/loadEnv.ps1 b/swaggerci/oracle.DefaultTag/test/loadEnv.ps1 new file mode 100644 index 000000000000..d2166fb535d4 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/loadEnv.ps1 @@ -0,0 +1,21 @@ +# ---------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# ---------------------------------------------------------------------------------- +$envFile = 'env.json' +if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' +} + +if (Test-Path -Path (Join-Path $PSScriptRoot $envFile)) { + $envFilePath = Join-Path $PSScriptRoot $envFile +} else { + $envFilePath = Join-Path $PSScriptRoot '..\$envFile' +} +$env = @{} +if (Test-Path -Path $envFilePath) { + $env = Get-Content (Join-Path $PSScriptRoot $envFile) | ConvertFrom-Json + $PSDefaultParameterValues=@{"*:Tenant"=$env.Tenant} +} \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/test/utils.ps1 b/swaggerci/oracle.DefaultTag/test/utils.ps1 new file mode 100644 index 000000000000..1990edd45299 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/test/utils.ps1 @@ -0,0 +1,31 @@ +function RandomString([bool]$allChars, [int32]$len) { + if ($allChars) { + return -join ((33..126) | Get-Random -Count $len | % {[char]$_}) + } else { + return -join ((48..57) + (97..122) | Get-Random -Count $len | % {[char]$_}) + } +} +$env = @{} +if ($UsePreviousConfigForRecord) { + $previousEnv = Get-Content (Join-Path $PSScriptRoot 'env.json') | ConvertFrom-Json + $previousEnv.psobject.properties | Foreach-Object { $env[$_.Name] = $_.Value } +} +# Add script method called AddWithCache to $env, when useCache is set true, it will try to get the value from the $env first. +# example: $val = $env.AddWithCache('key', $val, $true) +$env | Add-Member -Type ScriptMethod -Value { param( [string]$key, [object]$val, [bool]$useCache) if ($this.Contains($key) -and $useCache) { return $this[$key] } else { $this[$key] = $val; return $val } } -Name 'AddWithCache' +function setupEnv() { + # Preload subscriptionId and tenant from context, which will be used in test + # as default. You could change them if needed. + $env.SubscriptionId = (Get-AzContext).Subscription.Id + $env.Tenant = (Get-AzContext).Tenant.Id + # For any resources you created for test, you should add it to $env here. + $envFile = 'env.json' + if ($TestMode -eq 'live') { + $envFile = 'localEnv.json' + } + set-content -Path (Join-Path $PSScriptRoot $envFile) -Value (ConvertTo-Json $env) +} +function cleanupEnv() { + # Clean resources you create for testing +} + diff --git a/swaggerci/oracle.DefaultTag/utils/Get-SubscriptionIdTestSafe.ps1 b/swaggerci/oracle.DefaultTag/utils/Get-SubscriptionIdTestSafe.ps1 new file mode 100644 index 000000000000..5319862d3372 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/utils/Get-SubscriptionIdTestSafe.ps1 @@ -0,0 +1,7 @@ +param() +if ($env:AzPSAutorestTestPlaybackMode) { + $loadEnvPath = Join-Path $PSScriptRoot '..' 'test' 'loadEnv.ps1' + . ($loadEnvPath) + return $env.SubscriptionId +} +return (Get-AzContext).Subscription.Id \ No newline at end of file diff --git a/swaggerci/oracle.DefaultTag/utils/Unprotect-SecureString.ps1 b/swaggerci/oracle.DefaultTag/utils/Unprotect-SecureString.ps1 new file mode 100644 index 000000000000..cb05b51a6220 --- /dev/null +++ b/swaggerci/oracle.DefaultTag/utils/Unprotect-SecureString.ps1 @@ -0,0 +1,16 @@ +#This script converts securestring to plaintext + +param( + [Parameter(Mandatory, ValueFromPipeline)] + [System.Security.SecureString] + ${SecureString} +) + +$ssPtr = [System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($SecureString) +try { + $plaintext = [System.Runtime.InteropServices.Marshal]::PtrToStringBSTR($ssPtr) +} finally { + [System.Runtime.InteropServices.Marshal]::ZeroFreeBSTR($ssPtr) +} + +return $plaintext \ No newline at end of file